diff options
author | Florian Hahn <florian.hahn@arm.com> | 2017-08-12 17:40:18 +0000 |
---|---|---|
committer | Florian Hahn <florian.hahn@arm.com> | 2017-08-12 17:40:18 +0000 |
commit | a5ba4ee8bc7ae32f20a3811f45cd073737e718b3 (patch) | |
tree | 71a3da96917254186bfffb2be252a1c612233150 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | 32546d14346b5411b101f78787993aa74b519809 (diff) | |
download | bcm5719-llvm-a5ba4ee8bc7ae32f20a3811f45cd073737e718b3.tar.gz bcm5719-llvm-a5ba4ee8bc7ae32f20a3811f45cd073737e718b3.zip |
[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/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index 582153daebd..94bb9cbbb8a 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -476,11 +476,7 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) { // Use the triple's architecture and subarchitecture to determine // if we're thumb for the purposes of the top level code16 assembler // flag. - bool isThumb = TT.getArch() == Triple::thumb || - TT.getArch() == Triple::thumbeb || - TT.getSubArch() == Triple::ARMSubArch_v7m || - TT.getSubArch() == Triple::ARMSubArch_v6m; - if (!M.getModuleInlineAsm().empty() && isThumb) + if (!M.getModuleInlineAsm().empty() && TT.isThumb()) OutStreamer->EmitAssemblerFlag(MCAF_Code16); } |