diff options
author | Tim Northover <tnorthover@apple.com> | 2016-04-22 23:21:13 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-04-22 23:21:13 +0000 |
commit | d52a2441859a8ea234159965f6aee687e0ae9159 (patch) | |
tree | ca8b4ba3e772dcb9cf5a21fb2f6644123b24235d /tools/llvm-nm | |
parent | 4bfa27af78318ae769d4e1eaae87a6c86d02e1d3 (diff) |
MachO: remove weird ARM/Thumb interface from MachOObjectFile
Only one consumer (llvm-objdump) actually cared about the fact that there were
two triples. Others were actively working around the fact that the Triple
returned by getArch might have been invalid. As for llvm-objdump, it needs to
be acutely aware of both Triples anyway, so being generic in the exposed API is
no benefit.
Also rename the version of getArch returning a Triple. Users were having to
pass an unwanted nullptr to disambiguate the two, which was nasty.
The only functional change here is that armv7m and armv7em object files no
longer crash llvm-objdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index f86e758eb08..05ebc44ff83 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -1005,10 +1005,10 @@ static bool checkMachOAndArchFlags(SymbolicFile *O, std::string &Filename) { Triple T; if (MachO->is64Bit()) { H_64 = MachO->MachOObjectFile::getHeader64(); - T = MachOObjectFile::getArch(H_64.cputype, H_64.cpusubtype); + T = MachOObjectFile::getArchTriple(H_64.cputype, H_64.cpusubtype); } else { H = MachO->MachOObjectFile::getHeader(); - T = MachOObjectFile::getArch(H.cputype, H.cpusubtype); + T = MachOObjectFile::getArchTriple(H.cputype, H.cpusubtype); } if (std::none_of( ArchFlags.begin(), ArchFlags.end(), |