summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-07-18 23:46:16 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-07-18 23:46:16 +0000
commit215f3b7f02e657d56333aa28c89556c523b051a0 (patch)
treedc2542458c458a3269f5720b9698fdea94bd1d15
parent4e7d1e7e7bb36bcd715297b36d688bdc0ed96bdf (diff)
downloadbcm5719-llvm-215f3b7f02e657d56333aa28c89556c523b051a0.tar.gz
bcm5719-llvm-215f3b7f02e657d56333aa28c89556c523b051a0.zip
Revert r213415, "Merge two lines". It broke tests in -Asserts builds.
CGBuilder doesn't name instructions with Name. We should use Inst::setName() to name an instruction explicitly here. llvm-svn: 213431
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 0f9a3011fec..91f80419304 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -907,7 +907,8 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
if (isByRef)
LTy = BuildByRefType(&D);
- llvm::AllocaInst *Alloc = CreateTempAlloca(LTy, D.getName());
+ llvm::AllocaInst *Alloc = CreateTempAlloca(LTy);
+ Alloc->setName(D.getName());
CharUnits allocaAlignment = alignment;
if (isByRef)
OpenPOWER on IntegriCloud