summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorJim Lin <tclin914@gmail.com>2020-01-07 17:32:39 +0800
committerJim Lin <tclin914@gmail.com>2020-01-07 17:35:44 +0800
commitab1bcda851d95aeec03ffc1218bf9cae261a9280 (patch)
tree49743171ab6e0e51dfda5e8a26424369ed9010b8 /llvm/lib/MC/MCObjectFileInfo.cpp
parent4814b68b7ad2a4b0425d31a93ed2583cc1634445 (diff)
downloadbcm5719-llvm-ab1bcda851d95aeec03ffc1218bf9cae261a9280.tar.gz
bcm5719-llvm-ab1bcda851d95aeec03ffc1218bf9cae261a9280.zip
[NFC] Use isX86() instead of getArch()
Summary: This is a clean up for https://reviews.llvm.org/D72247. Reviewers: MaskRay, craig.topper, jhenderson Reviewed By: MaskRay Subscribers: hiraditya, rupprecht, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72320
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 76784c7bb0d..29fbda2be82 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -40,8 +40,7 @@ static bool useCompactUnwind(const Triple &T) {
return true;
// And the iOS simulator.
- if (T.isiOS() &&
- (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86))
+ if (T.isiOS() && T.isX86())
return true;
return false;
@@ -192,7 +191,7 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) {
Ctx->getMachOSection("__LD", "__compact_unwind", MachO::S_ATTR_DEBUG,
SectionKind::getReadOnly());
- if (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86)
+ if (T.isX86())
CompactUnwindDwarfEHFrameOnly = 0x04000000; // UNWIND_X86_64_MODE_DWARF
else if (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)
CompactUnwindDwarfEHFrameOnly = 0x03000000; // UNWIND_ARM64_MODE_DWARF
OpenPOWER on IntegriCloud