[lld] 4da38c1 - [lld] Rename addCombinedLTOObjects to match ELF driver. NFC
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 28 11:46:33 PDT 2021
Author: Sam Clegg
Date: 2021-10-28T11:46:19-07:00
New Revision: 4da38c14d00cf7348e58e8222452038b1d5df84c
URL: https://github.com/llvm/llvm-project/commit/4da38c14d00cf7348e58e8222452038b1d5df84c
DIFF: https://github.com/llvm/llvm-project/commit/4da38c14d00cf7348e58e8222452038b1d5df84c.diff
LOG: [lld] Rename addCombinedLTOObjects to match ELF driver. NFC
This function was renamed in https://reviews.llvm.org/D62291.
The new name seems more accurate and also its good to maintain
some consistency between these methods in the different drivers.
Differential Revision: https://reviews.llvm.org/D112719
Added:
Modified:
lld/COFF/Driver.cpp
lld/COFF/SymbolTable.cpp
lld/COFF/SymbolTable.h
lld/wasm/Driver.cpp
lld/wasm/SymbolTable.cpp
lld/wasm/SymbolTable.h
Removed:
################################################################################
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index a4681e4ca661..0d42bb70d7c7 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2138,11 +2138,11 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Do LTO by compiling bitcode input files to a set of native COFF files then
// link those files (unless -thinlto-index-only was given, in which case we
// resolve symbols and write indices, but don't generate native code or link).
- ctx.symtab.addCombinedLTOObjects();
+ ctx.symtab.compileBitcodeFiles();
// If -thinlto-index-only is given, we should create only "index
// files" and not object files. Index file creation is already done
- // in addCombinedLTOObject, so we are done if that's the case.
+ // in compileBitcodeFiles, so we are done if that's the case.
if (config->thinLTOIndexOnly)
return;
diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp
index cd644e865fca..89bfc5960286 100644
--- a/lld/COFF/SymbolTable.cpp
+++ b/lld/COFF/SymbolTable.cpp
@@ -865,7 +865,7 @@ Symbol *SymbolTable::addUndefined(StringRef name) {
return addUndefined(name, nullptr, false);
}
-void SymbolTable::addCombinedLTOObjects() {
+void SymbolTable::compileBitcodeFiles() {
if (ctx.bitcodeFileInstances.empty())
return;
diff --git a/lld/COFF/SymbolTable.h b/lld/COFF/SymbolTable.h
index 03bc7f90e82e..3e76b416d1a0 100644
--- a/lld/COFF/SymbolTable.h
+++ b/lld/COFF/SymbolTable.h
@@ -81,7 +81,7 @@ class SymbolTable {
// Build a set of COFF objects representing the combined contents of
// BitcodeFiles and add them to the symbol table. Called after all files are
// added and before the writer writes results to a file.
- void addCombinedLTOObjects();
+ void compileBitcodeFiles();
// Creates an Undefined symbol for a given name.
Symbol *addUndefined(StringRef name);
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index fe90876451f3..3a2d2fde34e2 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -970,7 +970,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Do link-time optimization if given files are LLVM bitcode files.
// This compiles bitcode files into real object files.
- symtab->addCombinedLTOObject();
+ symtab->compileBitcodeFiles();
if (errorCount())
return;
diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp
index 098d2e01efd6..63e66c145747 100644
--- a/lld/wasm/SymbolTable.cpp
+++ b/lld/wasm/SymbolTable.cpp
@@ -63,7 +63,7 @@ void SymbolTable::addFile(InputFile *file) {
// using LLVM functions and replaces bitcode symbols with the results.
// Because all bitcode files that the program consists of are passed
// to the compiler at once, it can do whole-program optimization.
-void SymbolTable::addCombinedLTOObject() {
+void SymbolTable::compileBitcodeFiles() {
// Prevent further LTO objects being included
BitcodeFile::doneLTO = true;
diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h
index c2a3ee34ac3f..80e2acee3808 100644
--- a/lld/wasm/SymbolTable.h
+++ b/lld/wasm/SymbolTable.h
@@ -41,7 +41,7 @@ class SymbolTable {
void addFile(InputFile *file);
- void addCombinedLTOObject();
+ void compileBitcodeFiles();
ArrayRef<Symbol *> getSymbols() const { return symVector; }
More information about the llvm-commits
mailing list