summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-09-14 02:55:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-09-14 02:55:16 +0000
commit0758644461caac5b56cbd439771d8e51d8ca52fa (patch)
treec908715775d703eafd10ca0369c6df09cfa2beb6 /llvm/tools/gold/gold-plugin.cpp
parent14568ff2ad4ee8bf5c98b8aae73f7dbed5f4d061 (diff)
downloadbcm5719-llvm-0758644461caac5b56cbd439771d8e51d8ca52fa.tar.gz
bcm5719-llvm-0758644461caac5b56cbd439771d8e51d8ca52fa.zip
gold: Simplify. Do not unnecessarily enumerate Obj's symbols.
llvm-svn: 281437
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 9c2280eb010..b347f554b87 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -568,14 +568,10 @@ static void addModule(LTO &Lto, claimed_file &F, const void *View) {
message(LDPL_FATAL, "Could not read bitcode from file : %s",
toString(ObjOrErr.takeError()).c_str());
- InputFile &Obj = **ObjOrErr;
-
unsigned SymNum = 0;
std::vector<SymbolResolution> Resols(F.syms.size());
- for (LLVM_ATTRIBUTE_UNUSED auto &ObjSym : Obj.symbols()) {
- ld_plugin_symbol &Sym = F.syms[SymNum];
- SymbolResolution &R = Resols[SymNum];
- ++SymNum;
+ for (ld_plugin_symbol &Sym : F.syms) {
+ SymbolResolution &R = Resols[SymNum++];
ld_plugin_symbol_resolution Resolution =
(ld_plugin_symbol_resolution)Sym.resolution;
OpenPOWER on IntegriCloud