diff options
author | Tim Northover <tnorthover@apple.com> | 2014-01-06 14:28:05 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-01-06 14:28:05 +0000 |
commit | 0aba46f4cda778036196ca721193b49bdc03a13d (patch) | |
tree | c9c4786904aa7ae5c9e2feccf881f9de0409c7f5 /lib/Target/ARM/ARMSubtarget.h | |
parent | f1c1a7ce442676a1bc9250382ae45673f7a72a43 (diff) | |
download | llvm-0aba46f4cda778036196ca721193b49bdc03a13d.tar.gz llvm-0aba46f4cda778036196ca721193b49bdc03a13d.tar.bz2 llvm-0aba46f4cda778036196ca721193b49bdc03a13d.tar.xz |
ARM MachO: sort out isTargetDarwin/isTargetIOS/... checks.
The ARM backend has been using most of the MachO related subtarget
checks almost interchangeably, and since the only target it's had to
run on has been IOS (which is all three of MachO, Darwin and IOS) it's
worked out OK so far.
But we'd like to support embedded targets under the "*-*-none-macho"
triple, which means everything starts falling apart and inconsistent
behaviours emerge.
This patch should pick a reasonably sensible set of behaviours for the
new triple (and any others that come along, with luck). Some choices
were debatable (notably FP == r7 or r11), but we can revisit those
later when deficiencies become apparent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index d1433ecade..3a9f940381 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -311,7 +311,10 @@ public: bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); } bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); } bool isTargetLinux() const { return TargetTriple.isOSLinux(); } + bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); } + bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); } + // ARM EABI is the bare-metal EABI described in ARM ABI documents and // can be accessed via -target arm-none-eabi. This is NOT GNUEABI. // FIXME: Add a flag for bare-metal for that target and set Triple::EABI |