summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/TargetOptionsImpl.cpp7
-rw-r--r--llvm/lib/MC/MCTargetOptions.cpp7
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp7
3 files changed, 10 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
index d2dd59b0236..618d903a090 100644
--- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp
+++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
@@ -58,10 +58,3 @@ StringRef TargetOptions::getTrapFunctionName() const {
StringRef TargetOptions::getCFIFuncName() const {
return CFIFuncName;
}
-
-/// getABIName - If this returns a non-empty string this represents the
-/// textual name of the ABI that we want the backend to use, e.g. o32, or
-/// aapcs-linux.
-StringRef TargetOptions::getABIName() const {
- return ABIName;
-}
diff --git a/llvm/lib/MC/MCTargetOptions.cpp b/llvm/lib/MC/MCTargetOptions.cpp
index 3093ba2b87e..1258d9e29f2 100644
--- a/llvm/lib/MC/MCTargetOptions.cpp
+++ b/llvm/lib/MC/MCTargetOptions.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCTargetOptions.h"
namespace llvm {
@@ -15,6 +16,10 @@ MCTargetOptions::MCTargetOptions()
: SanitizeAddress(false), MCRelaxAll(false), MCNoExecStack(false),
MCFatalWarnings(false), MCSaveTempLabels(false),
MCUseDwarfDirectory(false), ShowMCEncoding(false), ShowMCInst(false),
- AsmVerbose(false), DwarfVersion(0) {}
+ AsmVerbose(false), DwarfVersion(0), ABIName() {}
+
+StringRef MCTargetOptions::getABIName() const {
+ return ABIName;
+}
} // end namespace llvm
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index d0a768aabb3..21b1d46019f 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -55,12 +55,13 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
static ARMBaseTargetMachine::ARMABI
computeTargetABI(const Triple &TT, StringRef CPU,
const TargetOptions &Options) {
- if (Options.getABIName().startswith("aapcs"))
+ if (Options.MCOptions.getABIName().startswith("aapcs"))
return ARMBaseTargetMachine::ARM_ABI_AAPCS;
- else if (Options.getABIName().startswith("apcs"))
+ else if (Options.MCOptions.getABIName().startswith("apcs"))
return ARMBaseTargetMachine::ARM_ABI_APCS;
- assert(Options.getABIName().empty() && "Unknown target-abi option!");
+ assert(Options.MCOptions.getABIName().empty() &&
+ "Unknown target-abi option!");
ARMBaseTargetMachine::ARMABI TargetABI =
ARMBaseTargetMachine::ARM_ABI_UNKNOWN;
OpenPOWER on IntegriCloud