summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-07-03 18:02:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-07-03 18:02:36 +0000
commite2df87f24b0af7fa80789e8da15c9cef9e6996f7 (patch)
tree25e6cf38da2f66031e512d7b32cb933d3c038e25 /llvm/tools
parentdea0016f1e576d954b52e1d39fcb59ba10a05892 (diff)
downloadbcm5719-llvm-e2df87f24b0af7fa80789e8da15c9cef9e6996f7.tar.gz
bcm5719-llvm-e2df87f24b0af7fa80789e8da15c9cef9e6996f7.zip
Replace a few more MachO only uses of getSymbolAddress.
llvm-svn: 241365
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/dsymutil/DebugMap.cpp4
-rw-r--r--llvm/tools/dsymutil/MachODebugMapParser.cpp11
2 files changed, 6 insertions, 9 deletions
diff --git a/llvm/tools/dsymutil/DebugMap.cpp b/llvm/tools/dsymutil/DebugMap.cpp
index cc7c0dc778b..e5cc87b3f31 100644
--- a/llvm/tools/dsymutil/DebugMap.cpp
+++ b/llvm/tools/dsymutil/DebugMap.cpp
@@ -216,9 +216,7 @@ MappingTraits<dsymutil::DebugMapObject>::YamlDMO::denormalize(IO &IO) {
// during the test, we can't hardcode the symbols addresses, so
// look them up here and rewrite them.
for (const auto &Sym : ErrOrObjectFile->symbols()) {
- uint64_t Address;
- if (Sym.getAddress(Address))
- continue;
+ uint64_t Address = Sym.getValue();
ErrorOr<StringRef> Name = Sym.getName();
if (!Name)
continue;
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp
index c58545aec99..bec95915a0f 100644
--- a/llvm/tools/dsymutil/MachODebugMapParser.cpp
+++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp
@@ -198,8 +198,8 @@ void MachODebugMapParser::loadCurrentObjectFileSymbols() {
for (auto Sym : CurrentObjectHolder.Get().symbols()) {
- uint64_t Addr;
- if (Sym.getAddress(Addr) || Addr == UnknownAddress)
+ uint64_t Addr = Sym.getValue();
+ if (Addr == UnknownAddress)
continue;
ErrorOr<StringRef> Name = Sym.getName();
if (!Name)
@@ -228,14 +228,13 @@ void MachODebugMapParser::loadMainBinarySymbols() {
// Skip undefined and STAB entries.
if ((Type & SymbolRef::ST_Debug) || (Type & SymbolRef::ST_Unknown))
continue;
- uint64_t Addr;
+ uint64_t Addr = Sym.getValue();
// The only symbols of interest are the global variables. These
// are the only ones that need to be queried because the address
// of common data won't be described in the debug map. All other
// addresses should be fetched for the debug map.
- if (Sym.getAddress(Addr) || Addr == UnknownAddress ||
- !(Sym.getFlags() & SymbolRef::SF_Global) || Sym.getSection(Section) ||
- Section->isText())
+ if (Addr == UnknownAddress || !(Sym.getFlags() & SymbolRef::SF_Global) ||
+ Sym.getSection(Section) || Section->isText())
continue;
ErrorOr<StringRef> NameOrErr = Sym.getName();
if (!NameOrErr)
OpenPOWER on IntegriCloud