Index: test/MC/WebAssembly/bss.ll =================================================================== --- test/MC/WebAssembly/bss.ll +++ test/MC/WebAssembly/bss.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" @g0 = global i8* null, align 4 @g1 = global i32 0, align 4 Index: test/MC/WebAssembly/comdat.ll =================================================================== --- test/MC/WebAssembly/comdat.ll +++ test/MC/WebAssembly/comdat.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; Import a function just so we can check the index arithmetic for ; WASM_COMDAT_FUNCTION entries is performed correctly Index: test/MC/WebAssembly/custom-code-section.ll =================================================================== --- test/MC/WebAssembly/custom-code-section.ll +++ test/MC/WebAssembly/custom-code-section.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -O2 -filetype=obj %s -o %t.o +; RUN: llc -O2 -filetype=obj %s -o %t.o + +target triple = "wasm32-unknown-unknown-wasm" ; Wasm silently ignores custom sections for code. ; We had a bug where this cause a crash Index: test/MC/WebAssembly/debug-info.ll =================================================================== --- test/MC/WebAssembly/debug-info.ll +++ test/MC/WebAssembly/debug-info.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs +; RUN: llc -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs + +target triple = "wasm32-unknown-unknown-wasm" ; Debug information is currently not supported. This test simply verifies that ; a valid object generated. Index: test/MC/WebAssembly/explicit-sections.ll =================================================================== --- test/MC/WebAssembly/explicit-sections.ll +++ test/MC/WebAssembly/explicit-sections.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" %struct.bd = type { i32, i8 } Index: test/MC/WebAssembly/external-data.ll =================================================================== --- test/MC/WebAssembly/external-data.ll +++ test/MC/WebAssembly/external-data.ll @@ -1,4 +1,7 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" + ; Verify relocations are correctly generated for addresses of externals ; in the data section. Index: test/MC/WebAssembly/external-func-address.ll =================================================================== --- test/MC/WebAssembly/external-func-address.ll +++ test/MC/WebAssembly/external-func-address.ll @@ -1,4 +1,7 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" + ; Verify that addresses of external functions generate correctly typed ; imports and relocations or type R_TABLE_INDEX_I32. Index: test/MC/WebAssembly/func-address.ll =================================================================== --- test/MC/WebAssembly/func-address.ll +++ test/MC/WebAssembly/func-address.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -O2 -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs | FileCheck %s +; RUN: llc -O2 -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" declare i32 @import1() declare i32 @import2() Index: test/MC/WebAssembly/global-ctor-dtor.ll =================================================================== --- test/MC/WebAssembly/global-ctor-dtor.ll +++ test/MC/WebAssembly/global-ctor-dtor.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" @global1 = global i32 1025, align 8 Index: test/MC/WebAssembly/reloc-code.ll =================================================================== --- test/MC/WebAssembly/reloc-code.ll +++ test/MC/WebAssembly/reloc-code.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s +; RUN: llc -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; Pointers to functions of two different types @a = global i64 ()* inttoptr (i64 5 to i64 ()*), align 8 Index: test/MC/WebAssembly/reloc-data.ll =================================================================== --- test/MC/WebAssembly/reloc-data.ll +++ test/MC/WebAssembly/reloc-data.ll @@ -1,7 +1,10 @@ -; RUN: llc -O0 -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s +; RUN: llc -O0 -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; foo and bar are external and internal symbols. a and b are pointers ; initialized to these locations offset by 2 and -2 elements respecitively. + @foo = external global i32, align 4 @bar = global i64 7, align 4 @a = global i32* getelementptr (i32, i32* @foo, i32 2), align 8 Index: test/MC/WebAssembly/sections.ll =================================================================== --- test/MC/WebAssembly/sections.ll +++ test/MC/WebAssembly/sections.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s +; RUN: llc -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; external function declare i32 @a() @@ -13,7 +15,6 @@ ret i32 %tmp1 } - ; CHECK: Format: WASM ; CHECK: Arch: wasm32 ; CHECK: AddressSize: 32bit Index: test/MC/WebAssembly/stack-ptr.ll =================================================================== --- test/MC/WebAssembly/stack-ptr.ll +++ test/MC/WebAssembly/stack-ptr.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; Function that uses explict stack, and should generate a reference to ; __stack_pointer, along with the corresponding reloction entry. Index: test/MC/WebAssembly/unnamed-data.ll =================================================================== --- test/MC/WebAssembly/unnamed-data.ll +++ test/MC/WebAssembly/unnamed-data.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" @.str1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 @.str2 = private unnamed_addr constant [6 x i8] c"world\00", align 1 Index: test/MC/WebAssembly/visibility.ll =================================================================== --- test/MC/WebAssembly/visibility.ll +++ test/MC/WebAssembly/visibility.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; Function with __attribute__((visibility("default"))) define void @defaultVis() #0 { Index: test/MC/WebAssembly/weak-alias.ll =================================================================== --- test/MC/WebAssembly/weak-alias.ll +++ test/MC/WebAssembly/weak-alias.ll @@ -1,7 +1,9 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o %t.o +; RUN: llc -filetype=obj %s -o %t.o ; RUN: obj2yaml %t.o | FileCheck %s ; RUN: llvm-objdump -t %t.o | FileCheck --check-prefix=CHECK-SYMS %s +target triple = "wasm32-unknown-unknown-wasm" + ; 'foo_alias()' is weak alias of function 'foo()' ; 'bar_alias' is weak alias of global variable 'bar' ; Generates two exports of the same function, one of them weak Index: test/MC/WebAssembly/weak.ll =================================================================== --- test/MC/WebAssembly/weak.ll +++ test/MC/WebAssembly/weak.ll @@ -1,4 +1,6 @@ -; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s +; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s + +target triple = "wasm32-unknown-unknown-wasm" ; Weak external data reference @weak_external_data = extern_weak global i32, align 4