diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-21 15:47:23 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-21 15:47:23 +0000 |
commit | c3c8f2225dfb3a162020fb6a5ae61904ee5b4f5c (patch) | |
tree | f00ba6f85bdb86f3eb7c823361fd044ea9bc64e0 /lib/CodeGen/CGDecl.cpp | |
parent | 1b91ab467cffd44c222f1c5bed76910cce059a9e (diff) |
CodeGen: Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 3935df02df..1eb8539977 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#include "CGCXXABI.h" #include "CGDebugInfo.h" #include "CodeGenFunction.h" #include "CodeGenModule.h" @@ -180,12 +179,10 @@ CodeGenFunction::CreateStaticVarDecl(const VarDecl &D, // Use the label if the variable is renamed with the asm-label extension. std::string Name; - if (D.hasAttr<AsmLabelAttr>()) { - llvm::raw_string_ostream Out(Name); - CGM.getCXXABI().getMangleContext().mangleName(&D, Out); - } else { + if (D.hasAttr<AsmLabelAttr>()) + Name = CGM.getMangledName(&D); + else Name = GetStaticDeclName(*this, D, Separator); - } llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(Ty); llvm::GlobalVariable *GV = |