CodeGen: Simplify code.

llvm-svn: 145040
This commit is contained in:
Benjamin Kramer 2011-11-21 15:47:23 +00:00
parent 6270d072c5
commit 5642e19065
1 changed files with 3 additions and 6 deletions

View 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 =