[llvm] r245254 - [WebAssembly] Don't default to ELF in the triple.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 15:37:56 PDT 2015


Author: djg
Date: Mon Aug 17 17:37:56 2015
New Revision: 245254

URL: http://llvm.org/viewvc/llvm-project?rev=245254&view=rev
Log:
[WebAssembly] Don't default to ELF in the triple.

WebAssembly doesn't yet have a specified binary format, and it may not
end up being ELF, so we don't want the Triple class defaulting to ELF
for it at this time.

Modified:
    llvm/trunk/lib/Support/Triple.cpp

Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=245254&r1=245253&r2=245254&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Mon Aug 17 17:37:56 2015
@@ -539,6 +539,11 @@ static Triple::ObjectFormatType getDefau
     if (T.isOSDarwin())
       return Triple::MachO;
     return Triple::ELF;
+
+  case Triple::wasm32:
+  case Triple::wasm64:
+    // Unknown for now, until an object format is specified.
+    return Triple::UnknownObjectFormat;
   }
 
   if (T.isOSDarwin())




More information about the llvm-commits mailing list