diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-16 02:16:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-16 02:16:09 +0000 |
commit | 32c9512132f9240ac5b30303d1699b449a27d7c9 (patch) | |
tree | f7502b3397f86dfbe165e8478bb1c501448b58cf /llvm/lib/CodeGen/ELFWriter.cpp | |
parent | 3a3480fa53325e7a782170f97f5543209602aa3e (diff) | |
download | bcm5719-llvm-32c9512132f9240ac5b30303d1699b449a27d7c9.tar.gz bcm5719-llvm-32c9512132f9240ac5b30303d1699b449a27d7c9.zip |
remove a couple of actively incorrect uses of getMangledName.
llvm-svn: 93627
Diffstat (limited to 'llvm/lib/CodeGen/ELFWriter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ELFWriter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp index 5e5f58970ea..b9d24dca3af 100644 --- a/llvm/lib/CodeGen/ELFWriter.cpp +++ b/llvm/lib/CodeGen/ELFWriter.cpp @@ -54,7 +54,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/raw_ostream.h" - +#include "llvm/ADT/SmallString.h" using namespace llvm; char ELFWriter::ID = 0; @@ -906,9 +906,11 @@ void ELFWriter::EmitStringTable(const std::string &ModuleName) { ELFSym &Sym = *(*I); std::string Name; - if (Sym.isGlobalValue()) - Name.append(Mang->getMangledName(Sym.getGlobalValue())); - else if (Sym.isExternalSym()) + if (Sym.isGlobalValue()) { + SmallString<40> NameStr; + Mang->getNameWithPrefix(NameStr, Sym.getGlobalValue(), false); + Name.append(NameStr.begin(), NameStr.end()); + } else if (Sym.isExternalSym()) Name.append(Sym.getExternalSymbol()); else if (Sym.isFileType()) Name.append(ModuleName); |