MC: restore behaviour of defaulting to ELF
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 27 Apr 2014 04:54:16 +0000 (04:54 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 27 Apr 2014 04:54:16 +0000 (04:54 +0000)
This restores the previous behaviour of just assuming that if you dont specify a
valid triple that you really meant the default triple with an ELF object file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207349 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCObjectFileInfo.cpp

index efdf677fbb82021a17774b0c120b2d06cf815705..ba132f450fbed4585a2a8e01566d0aec02199746 100644 (file)
@@ -780,10 +780,9 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
       (T.isOSDarwin() || T.isOSBinFormatMachO())) {
     Env = IsMachO;
     InitMachOMCObjectFileInfo(T);
-  } else if (T.isOSWindows() && T.getObjectFormat() == Triple::COFF) {
-    assert((Arch == Triple::x86 || Arch == Triple::x86_64 ||
-            Arch == Triple::arm || Arch == Triple::thumb) &&
-           "unsupported Windows COFF architecture");
+  } else if ((Arch == Triple::x86 || Arch == Triple::x86_64 ||
+              Arch == Triple::arm || Arch == Triple::thumb) &&
+             (T.isOSWindows() && T.getObjectFormat() == Triple::COFF)) {
     Env = IsCOFF;
     InitCOFFMCObjectFileInfo(T);
   } else {