diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-17 19:23:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-17 19:23:46 +0000 |
commit | 83e872e1c411d562ae1fdf31b3d32cde7d6c86da (patch) | |
tree | cdea944f82ac16c0be863e0a3defcc7f3d288cdd /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | adecf175876a9a624fc1c5905594a478a53695b8 (diff) | |
download | bcm5719-llvm-83e872e1c411d562ae1fdf31b3d32cde7d6c86da.tar.gz bcm5719-llvm-83e872e1c411d562ae1fdf31b3d32cde7d6c86da.zip |
Get MCSymbol out of the mangling business, and move all the logic
to Mangler. Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.
This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.
llvm-svn: 93690
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 39c90cd8f9b..93cb420d628 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -579,18 +579,11 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, // into a 'uniqued' section name, create and return the section now. if (GV->isWeakForLinker()) { const char *Prefix = getSectionPrefixForUniqueGlobal(Kind); - SmallString<128> Name, MangledName; + SmallString<128> Name; Name.append(Prefix, Prefix+strlen(Prefix)); Mang->getNameWithPrefix(Name, GV, false); - - raw_svector_ostream OS(MangledName); - MCSymbol::printMangledName(Name, OS, 0); - OS.flush(); - - return getELFSection(MangledName.str(), - getELFSectionType(MangledName.str(), Kind), - getELFSectionFlags(Kind), - Kind); + return getELFSection(Name.str(), getELFSectionType(Name.str(), Kind), + getELFSectionFlags(Kind), Kind); } if (Kind.isText()) return TextSection; |