summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SymbolTable.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-07 10:40:26 +0000
committerFangrui Song <maskray@google.com>2019-05-07 10:40:26 +0000
commitf3994e4dfa0214b2a09a0e327ba37e6b38bbcdb3 (patch)
treed121c5f3cc500e4705f0be25144e20a9ba48061b /lld/ELF/SymbolTable.cpp
parentc5ac14eef874dda3b7053c788bda04f46aa034d9 (diff)
downloadbcm5719-llvm-f3994e4dfa0214b2a09a0e327ba37e6b38bbcdb3.tar.gz
bcm5719-llvm-f3994e4dfa0214b2a09a0e327ba37e6b38bbcdb3.zip
[ELF] Reorder BitcodeFiles.empty() to call thinLTOCreateEmptyIndexFiles() in only one place
It makes the --plugin-opt=obj-path= and --plugin-opt=thinlto-index-only= behavior more consistent - the files will be created in the BitcodeFiles.empty() case, but I assume whether it behaves this way is not required by anyone. LTOObj->run() cannot run with empty BitcodeFiles. There would be an error: ld.lld: error: No available targets are compatible with triple "" Differential Revision: https://reviews.llvm.org/D61635 llvm-svn: 360129
Diffstat (limited to 'lld/ELF/SymbolTable.cpp')
-rw-r--r--lld/ELF/SymbolTable.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index 1b017b07f58..6e69b25c61e 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -115,12 +115,6 @@ template <class ELFT> void SymbolTable::addFile(InputFile *File) {
// Because all bitcode files that the program consists of are passed
// to the compiler at once, it can do whole-program optimization.
template <class ELFT> void SymbolTable::addCombinedLTOObject() {
- if (BitcodeFiles.empty()) {
- if (Config->ThinLTOIndexOnly)
- thinLTOCreateEmptyIndexFiles();
- return;
- }
-
// Compile bitcode files and replace bitcode symbols.
LTO.reset(new BitcodeCompiler);
for (BitcodeFile *F : BitcodeFiles)
OpenPOWER on IntegriCloud