projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40eb513
)
Add comments
author
Adrian Prantl
<aprantl@apple.com>
Sat, 30 Sep 2017 00:22:21 +0000
(
00:22
+0000)
committer
Adrian Prantl
<aprantl@apple.com>
Sat, 30 Sep 2017 00:22:21 +0000
(
00:22
+0000)
llvm-svn: 314574
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
patch
|
blob
|
history
diff --git
a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index
c5584b8
..
c611696
100644
(file)
--- a/
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@
-221,12
+221,17
@@
static uint32_t getCPUType(MachOObjectFile &MachO) {
static bool filterArch(ObjectFile &Obj) {
if (ArchFilters.empty())
return true;
+
if (auto *MachO = dyn_cast<MachOObjectFile>(&Obj)) {
std::string ObjArch =
Triple::getArchTypeName(MachO->getArchTriple().getArch());
+
for (auto Arch : ArchFilters) {
+ // Match name.
if (Arch == ObjArch)
return true;
+
+ // Match architecture number.
unsigned Value;
if (!StringRef(Arch).getAsInteger(0, Value))
if (Value == getCPUType(*MachO))