From 215f3b7f02e657d56333aa28c89556c523b051a0 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 18 Jul 2014 23:46:16 +0000 Subject: [PATCH] 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 --- clang/lib/CodeGen/CGDecl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 0f9a301..91f8041 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) -- 2.7.4