summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-02-27 23:36:05 +0000
committerRui Ueyama <ruiu@google.com>2015-02-27 23:36:05 +0000
commitcb1c4d1a9a54a2e04d13ed4fd4ab116338449ea6 (patch)
tree6320b953e52551987748e82fb42a19f6df9cf15e /lld
parent3c78a513e629d47c4081b51e86c72ad0f40ab4ca (diff)
downloadbcm5719-llvm-cb1c4d1a9a54a2e04d13ed4fd4ab116338449ea6.tar.gz
bcm5719-llvm-cb1c4d1a9a54a2e04d13ed4fd4ab116338449ea6.zip
Remove a varaible that's used only once. NFC.
llvm-svn: 230813
Diffstat (limited to 'lld')
-rw-r--r--lld/lib/Core/Resolver.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index 61913f99ac2..656a0395f7c 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -422,27 +422,26 @@ bool Resolver::checkUndefines() {
if (!undefinedAtoms.empty()) {
// FIXME: need diagnostics interface for writing error messages
bool foundUndefines = false;
- for (const UndefinedAtom *undefAtom : undefinedAtoms) {
- const File &f = undefAtom->file();
-
+ for (const UndefinedAtom *undef : undefinedAtoms) {
// Skip over a weak symbol.
- if (undefAtom->canBeNull() != UndefinedAtom::canBeNullNever)
+ if (undef->canBeNull() != UndefinedAtom::canBeNullNever)
continue;
// If this is a library and undefined symbols are allowed on the
// target platform, skip over it.
- if (isa<SharedLibraryFile>(f) && _context.allowShlibUndefines())
+ if (isa<SharedLibraryFile>(undef->file()) &&
+ _context.allowShlibUndefines())
continue;
// If the undefine is coalesced away, skip over it.
- if (_symbolTable.isCoalescedAway(undefAtom))
+ if (_symbolTable.isCoalescedAway(undef))
continue;
// Seems like this symbol is undefined. Warn that.
foundUndefines = true;
if (_context.printRemainingUndefines()) {
- llvm::errs() << "Undefined symbol: " << undefAtom->file().path()
- << ": " << _context.demangle(undefAtom->name())
+ llvm::errs() << "Undefined symbol: " << undef->file().path()
+ << ": " << _context.demangle(undef->name())
<< "\n";
}
}
OpenPOWER on IntegriCloud