aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2017-08-12 17:40:18 +0000
committerFlorian Hahn <florian.hahn@arm.com>2017-08-12 17:40:18 +0000
commita5ba4ee8bc7ae32f20a3811f45cd073737e718b3 (patch)
tree71a3da96917254186bfffb2be252a1c612233150 /llvm/lib/MC/MCSectionELF.cpp
parent32546d14346b5411b101f78787993aa74b519809 (diff)
downloadllvm-a5ba4ee8bc7ae32f20a3811f45cd073737e718b3.zip
llvm-a5ba4ee8bc7ae32f20a3811f45cd073737e718b3.tar.gz
llvm-a5ba4ee8bc7ae32f20a3811f45cd073737e718b3.tar.bz2
[Triple] Add isThumb and isARM functions.
Summary: isThumb returns true for Thumb triples (little and big endian), isARM returns true for ARM triples (little and big endian). There are a few more checks using arm/thumb that are not covered by those functions, e.g. that the architecture is either ARM or Thumb (little endian) or ARM/Thumb little endian only. Reviewers: javed.absar, rengolin, kristof.beyls, t.p.northover Reviewed By: rengolin Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D34682 llvm-svn: 310781
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index 2f4f61a..bf1fcb0 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -113,8 +113,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
OS << 'c';
if (Flags & ELF::XCORE_SHF_DP_SECTION)
OS << 'd';
- } else if (Arch == Triple::arm || Arch == Triple::armeb ||
- Arch == Triple::thumb || Arch == Triple::thumbeb) {
+ } else if (T.isARM() || T.isThumb()) {
if (Flags & ELF::SHF_ARM_PURECODE)
OS << 'y';
}