[llvm] r207349 - MC: restore behaviour of defaulting to ELF

Saleem Abdulrasool compnerd at compnerd.org
Sat Apr 26 21:54:17 PDT 2014


Author: compnerd
Date: Sat Apr 26 23:54:16 2014
New Revision: 207349

URL: http://llvm.org/viewvc/llvm-project?rev=207349&view=rev
Log:
MC: restore behaviour of defaulting to ELF

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.

Modified:
    llvm/trunk/lib/MC/MCObjectFileInfo.cpp

Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=207349&r1=207348&r2=207349&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Sat Apr 26 23:54:16 2014
@@ -780,10 +780,9 @@ void MCObjectFileInfo::InitMCObjectFileI
       (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 {





More information about the llvm-commits mailing list