diff options
author | Kevin Enderby <enderby@apple.com> | 2014-06-19 22:03:18 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-06-19 22:03:18 +0000 |
commit | c28016e4131bdd50c23510adb3a0254b7fb5adc6 (patch) | |
tree | a3189bf985158cb78e2ca2b9ac6613fb53febced /include | |
parent | 0b5745abd8e46ac60cd16f949a2fd5a581fc8fd4 (diff) | |
download | llvm-c28016e4131bdd50c23510adb3a0254b7fb5adc6.tar.gz llvm-c28016e4131bdd50c23510adb3a0254b7fb5adc6.tar.bz2 llvm-c28016e4131bdd50c23510adb3a0254b7fb5adc6.tar.xz |
Change the output of llvm-nm and llvm-size for Mach-O universal files (aka
fat files) to print “ (for architecture XYZ)” for fat files with more than
one architecture to be like what the darwin tools do for fat files.
Also clean up the Mach-O printing of archive membernames in llvm-nm to use
the darwin form of "libx.a(foo.o)".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/MachOUniversal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Object/MachOUniversal.h b/include/llvm/Object/MachOUniversal.h index 47e93c26b4..74448f973b 100644 --- a/include/llvm/Object/MachOUniversal.h +++ b/include/llvm/Object/MachOUniversal.h @@ -18,6 +18,7 @@ #include "llvm/ADT/Triple.h" #include "llvm/Object/Binary.h" #include "llvm/Object/Archive.h" +#include "llvm/Object/MachO.h" #include "llvm/Support/ErrorOr.h" #include "llvm/Support/MachO.h" @@ -52,6 +53,9 @@ public: ObjectForArch getNext() const { return ObjectForArch(Parent, Index + 1); } uint32_t getCPUType() const { return Header.cputype; } + std::string getArchTypeName() const { + return Triple::getArchTypeName(MachOObjectFile::getArch(Header.cputype)); + } std::error_code getAsObjectFile(std::unique_ptr<ObjectFile> &Result) const; |