[llvm-commits] CVS: llvm/tools/lto/lto.cpp
Devang Patel
dpatel at apple.com
Tue Sep 5 17:46:06 PDT 2006
Changes in directory llvm/tools/lto:
lto.cpp updated: 1.9 -> 1.10
---
Log message:
Instead of demangling symbol name by hand, use original name, which was
used to mangle symbol name, directly.
---
Diffs of the changes: (+4 -2)
lto.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/tools/lto/lto.cpp
diff -u llvm/tools/lto/lto.cpp:1.9 llvm/tools/lto/lto.cpp:1.10
--- llvm/tools/lto/lto.cpp:1.9 Tue Sep 5 19:28:22 2006
+++ llvm/tools/lto/lto.cpp Tue Sep 5 19:45:52 2006
@@ -147,6 +147,7 @@
LLVMSymbol *newSymbol = new LLVMSymbol(lt, v, v->getName(),
mangler.getValueName(v));
symbols[newSymbol->getMangledName()] = newSymbol;
+ allSymbols[newSymbol->getMangledName()] = newSymbol;
for (unsigned count = 0, total = v->getNumOperands();
count != total; ++count)
@@ -291,8 +292,9 @@
// seen by linker.
for (unsigned i = 0, e = exportList.size(); i != e; ++i) {
const char *name = exportList[i];
- if (strlen(name) > 2 && name[0] == '_')
- exportList[i] = &name[1];
+ NameToSymbolMap::iterator itr = allSymbols.find(name);
+ if (itr != allSymbols.end())
+ exportList[i] = allSymbols[name]->getName();
}
sys::Path tmpAsmFilePath("/tmp/");
More information about the llvm-commits
mailing list