File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -908,6 +908,9 @@ void registerPredefinedTargetVersions() {
908
908
VersionCondition::addPredefinedGlobalIdent (" WASI" );
909
909
VersionCondition::addPredefinedGlobalIdent (" CRuntime_WASI" );
910
910
break ;
911
+ case llvm::Triple::Emscripten:
912
+ VersionCondition::addPredefinedGlobalIdent (" Emscripten" );
913
+ break ;
911
914
default :
912
915
if (triple.getEnvironment () == llvm::Triple::Android) {
913
916
VersionCondition::addPredefinedGlobalIdent (" Android" );
Original file line number Diff line number Diff line change
1
+ // REQUIRES: target_WebAssembly
2
+
3
+ // RUN: %ldc -mtriple=wasm32-unknown-emscripten -w -output-ll -of=%t.ll %s
4
+ // RUN: FileCheck %s < %t.ll
5
+
6
+ // test predefined versions:
7
+ version (Emscripten ) {} else static assert (0 );
8
+
9
+ void foo () {}
10
+
11
+ // CHECK: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20"
You can’t perform that action at this time.
0 commit comments