[llvm] r240575 - Use Symbol::getValue to simplify object::computeSymbolSizes. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 24 12:32:52 PDT 2015
Author: rafael
Date: Wed Jun 24 14:32:52 2015
New Revision: 240575
URL: http://llvm.org/viewvc/llvm-project?rev=240575&view=rev
Log:
Use Symbol::getValue to simplify object::computeSymbolSizes. NFC.
Modified:
llvm/trunk/lib/Object/SymbolSize.cpp
Modified: llvm/trunk/lib/Object/SymbolSize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/SymbolSize.cpp?rev=240575&r1=240574&r2=240575&view=diff
==============================================================================
--- llvm/trunk/lib/Object/SymbolSize.cpp (original)
+++ llvm/trunk/lib/Object/SymbolSize.cpp Wed Jun 24 14:32:52 2015
@@ -53,13 +53,11 @@ llvm::object::computeSymbolSizes(const O
unsigned SymNum = 0;
for (symbol_iterator I = O.symbol_begin(), E = O.symbol_end(); I != E; ++I) {
SymbolRef Sym = *I;
- uint64_t Address;
- if (std::error_code EC = Sym.getAddress(Address))
- return EC;
+ uint64_t Value = Sym.getValue();
section_iterator SecI = O.section_end();
if (std::error_code EC = Sym.getSection(SecI))
return EC;
- Addresses.push_back({I, Address, SymNum, *SecI});
+ Addresses.push_back({I, Value, SymNum, *SecI});
++SymNum;
}
for (const SectionRef Sec : O.sections()) {
More information about the llvm-commits
mailing list