Revert r213415, "Merge two lines". It broke tests in -Asserts builds.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 18 Jul 2014 23:46:16 +0000 (23:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 18 Jul 2014 23:46:16 +0000 (23:46 +0000)
CGBuilder doesn't name instructions with Name. We should use Inst::setName() to name an instruction explicitly here.

llvm-svn: 213431

clang/lib/CodeGen/CGDecl.cpp

index 0f9a301..91f8041 100644 (file)
@@ -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)