diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-19 19:22:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-19 19:22:40 +0000 |
commit | 1a3771e30e48b9cc21ccdc79fc9cf37ec4104b17 (patch) | |
tree | 03bb670e5f3a5a6dbb553fd41f49b4a4170cf402 /lib/Target/ARM/ARMSubtarget.cpp | |
parent | 8e1185bd5ccc00576d2a4755f0e5ea8da5abb312 (diff) |
Introduce TargetType's ELF and Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 35bb9accc3..27889c7818 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -22,8 +22,12 @@ static cl::opt<bool> Thumb("enable-thumb", cl::desc("Switch to thumb mode in ARM backend")); ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS) - : ARMArchVersion(V4T), HasVFP2(false), IsDarwin(false), - UseThumbBacktraces(false), IsR9Reserved(false), stackAlignment(8) { + : ARMArchVersion(V4T) + , HasVFP2(false) + , UseThumbBacktraces(false) + , IsR9Reserved(false) + , stackAlignment(8) + , TargetType(isELF) { // Default to ELF unless otherwise specified. // Determine default and user specified characteristics std::string CPU = "generic"; @@ -37,14 +41,15 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS) // if one cannot be determined, to true. const std::string& TT = M.getTargetTriple(); if (TT.length() > 5) { - IsDarwin = TT.find("-darwin") != std::string::npos; + if (TT.find("-darwin") != std::string::npos) + TargetType = isDarwin; } else if (TT.empty()) { #if defined(__APPLE__) - IsDarwin = true; + TargetType = isDarwin; #endif } - if (IsDarwin) { + if (isTargetDarwin()) { UseThumbBacktraces = true; IsR9Reserved = true; stackAlignment = 4; |