Skip to content

Instantly share code, notes, and snippets.

@jdm
Created December 11, 2013 01:54
Show Gist options
  • Save jdm/7903912 to your computer and use it in GitHub Desktop.
Save jdm/7903912 to your computer and use it in GitHub Desktop.
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index 6c1a500..355acd2 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -1579,6 +1579,7 @@ pub fn alloca_maybe_zeroed(cx: @mut Block, ty: Type, name: &str, zero: bool) ->
return llvm::LLVMGetUndef(ty.ptr_to().to_ref());
}
}
+ debuginfo::clear_source_location(cx.fcx);
let p = Alloca(cx, ty, name);
if zero {
let b = cx.fcx.ccx.builder();
@@ -1595,6 +1596,7 @@ pub fn arrayalloca(cx: @mut Block, ty: Type, v: ValueRef) -> ValueRef {
return llvm::LLVMGetUndef(ty.to_ref());
}
}
+ debuginfo::clear_source_location(cx.fcx);
return ArrayAlloca(cx, ty, v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment