X86 is the only target that uses coff format. This should fixes test failures running...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 20 Jul 2011 23:53:54 +0000 (23:53 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 20 Jul 2011 23:53:54 +0000 (23:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135639 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCObjectFileInfo.cpp

index 0b0a3e00955547ca2985571c589f8f246f2899ee..0cf98bd3b2aa3c4e2aa20262c60f14c0ab73d0a0 100644 (file)
@@ -518,8 +518,9 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
       (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) {
     Env = IsMachO;
     InitMachOMCObjectFileInfo(T);
-  } else if (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin ||
-             T.getOS() == Triple::Win32) {
+  } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) &&
+             (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin ||
+              T.getOS() == Triple::Win32)) {
     Env = IsCOFF;
     InitCOFFMCObjectFileInfo(T);
   } else {