From: Eric Christopher Date: Tue, 20 Sep 2016 16:04:59 +0000 (+0000) Subject: Remove a use of subtarget initialization in the X86 backend so we can get rid of... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57ab7e9f49271e407c7605f164c60e75eba86cc8;p=llvm Remove a use of subtarget initialization in the X86 backend so we can get rid of the default subtarget. NFC intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281982 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index d58882d7469..8abcd4481f2 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/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