diff options
author | Devang Patel <dpatel@apple.com> | 2006-08-14 22:36:16 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-08-14 22:36:16 +0000 |
commit | 30235dad4b77ed83ca985030aff4fb4767551e5d (patch) | |
tree | 6dba0f49b0e345a21f6abd38173ce4a95df555f1 /include/llvm | |
parent | 70bbf9a3dd9683a54818fbcdec75d929690f48c8 (diff) | |
download | external_llvm-30235dad4b77ed83ca985030aff4fb4767551e5d.zip external_llvm-30235dad4b77ed83ca985030aff4fb4767551e5d.tar.gz external_llvm-30235dad4b77ed83ca985030aff4fb4767551e5d.tar.bz2 |
Use mangler, instead of addUnderscore(), to get mangled name.
Now, LLVMSymbol keeps symbol original name and mangled name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/LinkTimeOptimizer.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/LinkTimeOptimizer.h b/include/llvm/LinkTimeOptimizer.h index c567a04..d4de787 100644 --- a/include/llvm/LinkTimeOptimizer.h +++ b/include/llvm/LinkTimeOptimizer.h @@ -55,11 +55,17 @@ namespace llvm { LTOLinkageTypes getLinkage() const { return linkage; } void mayBeNotUsed(); - LLVMSymbol (enum LTOLinkageTypes lt, GlobalValue *g) : linkage(lt), gv(g) {} + LLVMSymbol (enum LTOLinkageTypes lt, GlobalValue *g, std::string n, + std::string m) : linkage(lt), gv(g), name(n), mangledName(m) {} + + const char *getName() { return name.c_str(); } + const char *getMangledName() { return mangledName.c_str(); } private: enum LTOLinkageTypes linkage; GlobalValue *gv; + std::string name; + std::string mangledName; }; class string_compare { @@ -79,7 +85,7 @@ namespace llvm { enum LTOStatus readLLVMObjectFile(const std::string &InputFilename, NameToSymbolMap &symbols, - std::set<const char*> &references); + std::set<std::string> &references); enum LTOStatus optimizeModules(const std::string &OutputFilename, std::vector<const char*> &exportList); |