aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-08-17 22:37:56 +0000
committerDan Gohman <dan433584@gmail.com>2015-08-17 22:37:56 +0000
commitab48abeafafef67d5a27daf4da1e207d4e40c3dc (patch)
treed52fbb85befb760780ad5e8a5cfa104b7ac01381 /llvm/lib/Support/Triple.cpp
parentf66d3844439e3cadf9b4234fd4af7b452b4a5f62 (diff)
downloadllvm-ab48abeafafef67d5a27daf4da1e207d4e40c3dc.zip
llvm-ab48abeafafef67d5a27daf4da1e207d4e40c3dc.tar.gz
llvm-ab48abeafafef67d5a27daf4da1e207d4e40c3dc.tar.bz2
[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. llvm-svn: 245254
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index a2a88d2..201d352 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -539,6 +539,11 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
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())