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 | acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b (patch) | |
tree | e6d0919df01249161c80b675e0d9a1e5f091e350 /lib/Target/TargetLoweringObjectFile.cpp | |
parent | c7aa48da3f0d2daf00405e8b7ff823299245f547 (diff) | |
download | external_llvm-acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b.zip external_llvm-acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b.tar.gz external_llvm-acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index 39c90cd..93cb420 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/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; |