]> granicus.if.org Git - clang/commitdiff
CodeGen: Simplify code.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 21 Nov 2011 15:47:23 +0000 (15:47 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 21 Nov 2011 15:47:23 +0000 (15:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145040 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDecl.cpp

index 3935df02dfadb9256fd269f03640550b6ac8b735..1eb85399771592377a0393b060c8284772461804 100644 (file)
@@ -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 =