diff options
author | Eric Christopher <echristo@gmail.com> | 2014-12-18 02:20:58 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-12-18 02:20:58 +0000 |
commit | 661f2d1ca1fb6d55cc54b71ec06b3310d07e229a (patch) | |
tree | cd8a48b6789fc41dfb829e5ef331a833bec98e1e /llvm/lib/Target/ARM/ARMSubtarget.h | |
parent | 560cc4fb44e11c0153f985639375598b53831e18 (diff) | |
download | bcm5719-llvm-661f2d1ca1fb6d55cc54b71ec06b3310d07e229a.tar.gz bcm5719-llvm-661f2d1ca1fb6d55cc54b71ec06b3310d07e229a.zip |
Add a new string member to the TargetOptions struct for the name
of the abi we should be using. For targets that don't use the
option there's no change, otherwise this allows external users
to set the ABI via string and avoid some of the -backend-option
pain in clang.
Use this option to move the ABI for the ARM port from the
Subtarget to the TargetMachine and update the testcases
accordingly since it's no longer valid to set via -mattr.
llvm-svn: 224492
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h index 7e8370589a0..69363307f7e 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/llvm/lib/Target/ARM/ARMSubtarget.h @@ -37,6 +37,7 @@ namespace llvm { class GlobalValue; class StringRef; class TargetOptions; +class ARMBaseTargetMachine; class ARMSubtarget : public ARMGenSubtargetInfo { protected: @@ -225,18 +226,14 @@ protected: /// Options passed via command line that could influence the target const TargetOptions &Options; - public: - enum { - ARM_ABI_UNKNOWN, - ARM_ABI_APCS, - ARM_ABI_AAPCS // ARM EABI - } TargetABI; + const ARMBaseTargetMachine &TM; +public: /// This constructor initializes the data members to match that /// of the specified triple. /// ARMSubtarget(const std::string &TT, const std::string &CPU, - const std::string &FS, const TargetMachine &TM, bool IsLittle); + const std::string &FS, const ARMBaseTargetMachine &TM, bool IsLittle); /// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size /// that still makes it profitable to inline the call. @@ -388,14 +385,8 @@ public: return TargetTriple.getEnvironment() == Triple::Android; } - bool isAPCS_ABI() const { - assert(TargetABI != ARM_ABI_UNKNOWN); - return TargetABI == ARM_ABI_APCS; - } - bool isAAPCS_ABI() const { - assert(TargetABI != ARM_ABI_UNKNOWN); - return TargetABI == ARM_ABI_AAPCS; - } + bool isAPCS_ABI() const; + bool isAAPCS_ABI() const; bool isThumb() const { return InThumbMode; } bool isThumb1Only() const { return InThumbMode && !HasThumb2; } |