[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:
Shankar Easwaran 2013-06-24 03:22:51 +00:00
parent 210e86d7c4
commit 2302bd5568
3 changed files with 7 additions and 7 deletions

View File

@ -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.

View File

@ -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

View File

@ -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);