[llvm] r238612 - Only add the EH state insertion pass on 32-bit Windows

Reid Kleckner reid at kleckner.net
Fri May 29 13:43:10 PDT 2015


Author: rnk
Date: Fri May 29 15:43:10 2015
New Revision: 238612

URL: http://llvm.org/viewvc/llvm-project?rev=238612&view=rev
Log:
Only add the EH state insertion pass on 32-bit Windows

Modified:
    llvm/trunk/lib/Target/X86/X86TargetMachine.cpp

Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=238612&r1=238611&r2=238612&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri May 29 15:43:10 2015
@@ -221,9 +221,9 @@ bool X86PassConfig::addILPOpts() {
 }
 
 bool X86PassConfig::addPreISel() {
-  // Only add this pass for 32-bit x86.
+  // Only add this pass for 32-bit x86 Windows.
   Triple TT(TM->getTargetTriple());
-  if (TT.getArch() == Triple::x86)
+  if (TT.isOSWindows() && TT.getArch() == Triple::x86)
     addPass(createX86WinEHStatePass());
   return true;
 }





More information about the llvm-commits mailing list