aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-05 22:59:19 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-05 22:59:19 +0000
commitfe345572459b69a6b680322fef504b4f8bd98dd7 (patch)
tree9aa427c1010bf075e3ea151c07171e88c32045fa /lib/CodeGen/CGDecl.cpp
parent5c42f9ba44094eb1a05f8d36c5479645ffbb3c7b (diff)
Don't mangle names of local variables.
- For one thing, this adds unneeded overhead; for another, this routine can be used to emit unnamed decls which we shouldn't try to mangle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 3dfb1821cc..e750d8a8d5 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -236,8 +236,8 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
const llvm::Type *LTy = ConvertTypeForMem(Ty);
if (isByRef)
LTy = BuildByRefType(Ty, getContext().getDeclAlignInBytes(&D));
- llvm::AllocaInst *Alloc =
- CreateTempAlloca(LTy, CGM.getMangledName(&D));
+ llvm::AllocaInst *Alloc =
+ CreateTempAlloca(LTy, D.getNameAsString().c_str());
if (isByRef)
Alloc->setAlignment(std::max(getContext().getDeclAlignInBytes(&D),
getContext().getTypeAlign(getContext().VoidPtrTy) / 8));