Only add the EH state insertion pass on 32-bit Windows

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner 2015-05-29 20:43:10 +00:00
parent 5760c5fe31
commit 38a2e49d1c

View File

@ -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;
}