summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2016-09-20 16:04:59 +0000
committerEric Christopher <echristo@gmail.com>2016-09-20 16:04:59 +0000
commitef579d21953fb66f921fd31ab549f8c2584e67b6 (patch)
tree43bfcca1a5f6b9bdbd00ec30b112818fee30c852 /llvm
parent0be7793d75378163f6f6e4724c94370971d342a0 (diff)
downloadbcm5719-llvm-ef579d21953fb66f921fd31ab549f8c2584e67b6.tar.gz
bcm5719-llvm-ef579d21953fb66f921fd31ab549f8c2584e67b6.zip
Remove a use of subtarget initialization in the X86 backend so we can get rid of the default subtarget.
NFC intended. llvm-svn: 281982
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index d58882d7469..8abcd4481f2 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -159,7 +159,10 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT,
// (which on X86, happens to be the 'ud2' instruction)
// On PS4, the "return address" of a 'noreturn' call must still be within
// the calling function, and TrapUnreachable is an easy way to get that.
- if (Subtarget.isTargetWin64() || Subtarget.isTargetPS4())
+ // The check here for 64-bit windows is a bit icky, but as we're unlikely
+ // to ever want to mix 32 and 64-bit windows code in a single module
+ // this should be fine.
+ if ((TT.isOSWindows() && TT.getArch() == Triple::x86_64) || TT.isPS4())
this->Options.TrapUnreachable = true;
// By default (and when -ffast-math is on), enable estimate codegen for
OpenPOWER on IntegriCloud