diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-05 22:59:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-05 22:59:19 +0000 |
commit | f804897ee94fe082cc840c5eca54ae6698324452 (patch) | |
tree | 6839cb2d7f63ac85cf5b248c3d9f927e85bdd45b /clang/lib/CodeGen/CGDecl.cpp | |
parent | 3add5e51ff569c38ce56b5a9a1f08a800960757e (diff) | |
download | bcm5719-llvm-f804897ee94fe082cc840c5eca54ae6698324452.tar.gz bcm5719-llvm-f804897ee94fe082cc840c5eca54ae6698324452.zip |
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.
llvm-svn: 66212
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 3dfb1821cc0..e750d8a8d5b 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/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)); |