summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 441c9fcdbf6..1d9f0f844eb 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -163,9 +163,11 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy,
// later. Don't create this with the builder, because we don't want it
// folded.
llvm::Value *Undef = llvm::UndefValue::get(llvm::Type::Int32Ty);
- AllocaInsertPt = new llvm::BitCastInst(Undef, llvm::Type::Int32Ty, "allocapt",
+ AllocaInsertPt = new llvm::BitCastInst(Undef, llvm::Type::Int32Ty, "",
EntryBB);
-
+ if (Builder.isNamePreserving())
+ AllocaInsertPt->setName("allocapt");
+
ReturnBlock = createBasicBlock("return");
ReturnValue = 0;
if (!RetTy->isVoidType())
OpenPOWER on IntegriCloud