Skip to content

Commit 4da38c1

Browse files
committed
[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
1 parent bef7772 commit 4da38c1

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

lld/COFF/Driver.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2138,11 +2138,11 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
21382138
// Do LTO by compiling bitcode input files to a set of native COFF files then
21392139
// link those files (unless -thinlto-index-only was given, in which case we
21402140
// resolve symbols and write indices, but don't generate native code or link).
2141-
ctx.symtab.addCombinedLTOObjects();
2141+
ctx.symtab.compileBitcodeFiles();
21422142

21432143
// If -thinlto-index-only is given, we should create only "index
21442144
// files" and not object files. Index file creation is already done
2145-
// in addCombinedLTOObject, so we are done if that's the case.
2145+
// in compileBitcodeFiles, so we are done if that's the case.
21462146
if (config->thinLTOIndexOnly)
21472147
return;
21482148

lld/COFF/SymbolTable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ Symbol *SymbolTable::addUndefined(StringRef name) {
865865
return addUndefined(name, nullptr, false);
866866
}
867867

868-
void SymbolTable::addCombinedLTOObjects() {
868+
void SymbolTable::compileBitcodeFiles() {
869869
if (ctx.bitcodeFileInstances.empty())
870870
return;
871871

lld/COFF/SymbolTable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class SymbolTable {
8181
// Build a set of COFF objects representing the combined contents of
8282
// BitcodeFiles and add them to the symbol table. Called after all files are
8383
// added and before the writer writes results to a file.
84-
void addCombinedLTOObjects();
84+
void compileBitcodeFiles();
8585

8686
// Creates an Undefined symbol for a given name.
8787
Symbol *addUndefined(StringRef name);

lld/wasm/Driver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
970970

971971
// Do link-time optimization if given files are LLVM bitcode files.
972972
// This compiles bitcode files into real object files.
973-
symtab->addCombinedLTOObject();
973+
symtab->compileBitcodeFiles();
974974
if (errorCount())
975975
return;
976976

lld/wasm/SymbolTable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void SymbolTable::addFile(InputFile *file) {
6363
// using LLVM functions and replaces bitcode symbols with the results.
6464
// Because all bitcode files that the program consists of are passed
6565
// to the compiler at once, it can do whole-program optimization.
66-
void SymbolTable::addCombinedLTOObject() {
66+
void SymbolTable::compileBitcodeFiles() {
6767
// Prevent further LTO objects being included
6868
BitcodeFile::doneLTO = true;
6969

lld/wasm/SymbolTable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SymbolTable {
4141

4242
void addFile(InputFile *file);
4343

44-
void addCombinedLTOObject();
44+
void compileBitcodeFiles();
4545

4646
ArrayRef<Symbol *> getSymbols() const { return symVector; }
4747

0 commit comments

Comments
 (0)