From: NAKAMURA Takumi Date: Fri, 18 Jul 2014 23:46:16 +0000 (+0000) Subject: Revert r213415, "Merge two lines". It broke tests in -Asserts builds. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41b1c7360d86805e720ece80593c455465e3afae;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213431 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 0f9a3011fe..91f8041930 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/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)