diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-12-09 16:50:57 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-12-09 16:50:57 +0000 |
commit | a4f104b2ce0f17f74d6db2d89169f0b01053eeb6 (patch) | |
tree | c13006539800da5d53fbbde39289e5b88d2652cb /llvm/tools/gold/gold-plugin.cpp | |
parent | 4187962697234e06b13feca6c0996c08d73bab8b (diff) | |
download | bcm5719-llvm-a4f104b2ce0f17f74d6db2d89169f0b01053eeb6.tar.gz bcm5719-llvm-a4f104b2ce0f17f74d6db2d89169f0b01053eeb6.zip |
Remember the unmangled name in the plugin.
This allows it to work with non trivial manglings like the one in COFF.
Amusingly, this can be tested with gold, as emit-llvm causes the plugin to
exit before any COFF is generated.
llvm-svn: 223790
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 972dbd32365..2cb181eca38 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -625,7 +625,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile, // Since we use the regular lib/Linker, we cannot just internalize GV // now or it will not be copied to the merged module. Instead we force // it to be copied and then internalize it. - Internalize.insert(Sym.name); + Internalize.insert(GV->getName()); } break; } @@ -638,7 +638,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile, // Gold might have selected a linkonce_odr and preempted a weak_odr. // In that case we have to make sure we don't end up internalizing it. if (!GV->isDiscardableIfUnused()) - Maybe.erase(Sym.name); + Maybe.erase(GV->getName()); // fall-through case LDPR_PREEMPTED_REG: @@ -651,7 +651,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile, // and in that module the address might be significant, but that // copy will be LDPR_PREEMPTED_IR. if (GV->hasLinkOnceODRLinkage()) - Maybe.insert(Sym.name); + Maybe.insert(GV->getName()); keepGlobalValue(*GV, KeptAliases); break; } |