mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
[lld] rename member variable name.
This renames variable name to reflect initial undefined symbols that are defined by the linker -u option. This doesnot change any functionality in lld, and updates code to reflect Nick's comment. llvm-svn: 184682
This commit is contained in:
parent
210e86d7c4
commit
2302bd5568
@ -241,8 +241,8 @@ public:
|
||||
/// This method adds undefined symbols specified by the -u option to the
|
||||
/// to the list of undefined symbols known to the linker. This option
|
||||
/// essentially forces an undefined symbol to be create.
|
||||
void addUndefinedSymbol(StringRef symbolName) {
|
||||
_undefinedSymbols.push_back(symbolName);
|
||||
void addInitialUndefinedSymbol(StringRef symbolName) {
|
||||
_initialUndefinedSymbols.push_back(symbolName);
|
||||
}
|
||||
|
||||
/// Iterators for symbols that appear on the command line
|
||||
@ -252,8 +252,8 @@ public:
|
||||
|
||||
/// Return the list of undefined symbols that are specified in the
|
||||
/// linker command line, using the -u option.
|
||||
range<const StringRef *> undefinedSymbols() const {
|
||||
return _undefinedSymbols;
|
||||
range<const StringRef *> initialUndefinedSymbols() const {
|
||||
return _initialUndefinedSymbols;
|
||||
}
|
||||
|
||||
/// After all set* methods are called, the Driver calls this method
|
||||
@ -359,7 +359,7 @@ protected:
|
||||
std::vector<LinkerInput> _inputFiles;
|
||||
std::vector<const char*> _llvmOptions;
|
||||
std::unique_ptr<Reader> _yamlReader;
|
||||
StringRefVector _undefinedSymbols;
|
||||
StringRefVector _initialUndefinedSymbols;
|
||||
|
||||
private:
|
||||
/// Validate the subclass bits. Only called by validate.
|
||||
|
@ -221,7 +221,7 @@ GnuLdDriver::parse(int argc, const char *argv[], raw_ostream &diagnostics) {
|
||||
for (llvm::opt::arg_iterator it = parsedArgs->filtered_begin(OPT_u),
|
||||
ie = parsedArgs->filtered_end();
|
||||
it != ie; ++it) {
|
||||
options->addUndefinedSymbol((*it)->getValue());
|
||||
options->addInitialUndefinedSymbol((*it)->getValue());
|
||||
}
|
||||
|
||||
// Handle -Lxxx
|
||||
|
@ -240,7 +240,7 @@ void OutputELFWriter<ELFT>::addFiles(InputFiles &inputFiles) {
|
||||
_targetHandler.addFiles(inputFiles);
|
||||
// Add all symbols that are specified by the -u option
|
||||
// as part of the command line argument to lld
|
||||
for (auto ai : _targetInfo.undefinedSymbols())
|
||||
for (auto ai : _targetInfo.initialUndefinedSymbols())
|
||||
_linkerInternalFile.addUndefinedAtom(ai);
|
||||
// Make the linker internal file to be the first file
|
||||
inputFiles.prependFile(_linkerInternalFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user