summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-07-13 16:35:56 +0000
committerTeresa Johnson <tejohnson@google.com>2016-07-13 16:35:56 +0000
commitb907d06151623e17bd7755de4d6f52290e14de09 (patch)
tree104bfb92cfff22feade2366356ea85ec6af7a13c
parent610a2f65253526b866c230132cde8595a7303376 (diff)
downloadbcm5719-llvm-b907d06151623e17bd7755de4d6f52290e14de09.tar.gz
bcm5719-llvm-b907d06151623e17bd7755de4d6f52290e14de09.zip
[ThinLTO/gold] Enable symbol resolution in distributed backend case
While testing a follow-on change to enable index-based symbol resolution and internalization in the distributed backends, I realized that a test case change I made in r275247 was only required because we were not analyzing symbols in the claimed files in thinlto-index-only mode. In the fixed test case there should be no internalization because we are linking in -shared mode, so f() is in fact exported, which is detected properly when we analyze symbols in thinlto-index-only mode. Note that this is not (yet) a correctness issue (because we are not yet performing the index-based linkage optimizations in the distributed backends - that's coming in a follow-on patch). llvm-svn: 275277
-rw-r--r--llvm/test/tools/gold/X86/thinlto.ll2
-rw-r--r--llvm/tools/gold/gold-plugin.cpp5
2 files changed, 0 insertions, 7 deletions
diff --git a/llvm/test/tools/gold/X86/thinlto.ll b/llvm/test/tools/gold/X86/thinlto.ll
index 771dfa03154..09bf21d4a82 100644
--- a/llvm/test/tools/gold/X86/thinlto.ll
+++ b/llvm/test/tools/gold/X86/thinlto.ll
@@ -62,8 +62,6 @@
; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK
; BACKEND1-NEXT: <GLOBALVAL_SUMMARY_BLOCK
; BACKEND1-NEXT: <VERSION
-; One of these will be a COMBINED_ORIGINAL_NAME since f can be internalized.
-; BACKEND1-NEXT: <COMBINED
; BACKEND1-NEXT: <COMBINED
; BACKEND1-NEXT: <COMBINED
; BACKEND1-NEXT: </GLOBALVAL_SUMMARY_BLOCK
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 4fff5dcf900..dfe3d6f6971 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -524,11 +524,6 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
cf.name += ".llvm." + std::to_string(file->offset) + "." +
sys::path::filename(Obj->getModule().getSourceFileName()).str();
- // If we are doing ThinLTO compilation, don't need to process the symbols.
- // Later we simply build a combined index file after all files are claimed.
- if (options::thinlto && options::thinlto_index_only)
- return LDPS_OK;
-
for (auto &Sym : Obj->symbols()) {
uint32_t Symflags = Sym.getFlags();
if (shouldSkip(Symflags))
OpenPOWER on IntegriCloud