[lld] r323299 - [WebAssembly] Use inline target tripple in test cases
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 19:29:48 PST 2018
Author: sbc
Date: Tue Jan 23 19:29:47 2018
New Revision: 323299
URL: http://llvm.org/viewvc/llvm-project?rev=323299&view=rev
Log:
[WebAssembly] Use inline target tripple in test cases
This is somewhat preferable since (in many cases) it allows llc
to be run directly on the .ll files without having to pass the
`-mtriple` argument.
Differential Revision: https://reviews.llvm.org/D42438
Added:
lld/trunk/test/wasm/invalid-stack-size.ll
- copied, changed from r323288, lld/trunk/test/wasm/invalid-stack-size.test
Removed:
lld/trunk/test/wasm/invalid-stack-size.test
Modified:
lld/trunk/test/wasm/Inputs/archive1.ll
lld/trunk/test/wasm/Inputs/archive2.ll
lld/trunk/test/wasm/Inputs/call-indirect.ll
lld/trunk/test/wasm/Inputs/comdat1.ll
lld/trunk/test/wasm/Inputs/comdat2.ll
lld/trunk/test/wasm/Inputs/global-ctor-dtor.ll
lld/trunk/test/wasm/Inputs/hello.ll
lld/trunk/test/wasm/Inputs/hidden.ll
lld/trunk/test/wasm/Inputs/locals-duplicate1.ll
lld/trunk/test/wasm/Inputs/locals-duplicate2.ll
lld/trunk/test/wasm/Inputs/many-funcs.ll
lld/trunk/test/wasm/Inputs/ret32.ll
lld/trunk/test/wasm/Inputs/ret64.ll
lld/trunk/test/wasm/Inputs/weak-alias.ll
lld/trunk/test/wasm/Inputs/weak-symbol1.ll
lld/trunk/test/wasm/Inputs/weak-symbol2.ll
lld/trunk/test/wasm/alias.ll
lld/trunk/test/wasm/archive.ll
lld/trunk/test/wasm/call-indirect.ll
lld/trunk/test/wasm/comdats.ll
lld/trunk/test/wasm/conflict.test
lld/trunk/test/wasm/data-layout.ll
lld/trunk/test/wasm/entry.ll
lld/trunk/test/wasm/export.ll
lld/trunk/test/wasm/function-imports-first.ll
lld/trunk/test/wasm/function-imports.ll
lld/trunk/test/wasm/function-index.test
lld/trunk/test/wasm/import-memory.test
lld/trunk/test/wasm/init-fini.ll
lld/trunk/test/wasm/load-undefined.ll
lld/trunk/test/wasm/local-symbols.ll
lld/trunk/test/wasm/locals-duplicate.test
lld/trunk/test/wasm/many-functions.ll
lld/trunk/test/wasm/relocatable.ll
lld/trunk/test/wasm/signature-mismatch.ll
lld/trunk/test/wasm/stack-pointer.ll
lld/trunk/test/wasm/strip-debug.test
lld/trunk/test/wasm/symbol-type-mismatch.ll
lld/trunk/test/wasm/undefined-entry.test
lld/trunk/test/wasm/undefined.ll
lld/trunk/test/wasm/version.ll
lld/trunk/test/wasm/visibility-hidden.ll
lld/trunk/test/wasm/weak-alias-overide.ll
lld/trunk/test/wasm/weak-alias.ll
lld/trunk/test/wasm/weak-symbols.ll
lld/trunk/test/wasm/weak-undefined.ll
Modified: lld/trunk/test/wasm/Inputs/archive1.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/archive1.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/archive1.ll (original)
+++ lld/trunk/test/wasm/Inputs/archive1.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @bar() local_unnamed_addr #1
define i32 @foo() local_unnamed_addr #0 {
Modified: lld/trunk/test/wasm/Inputs/archive2.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/archive2.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/archive2.ll (original)
+++ lld/trunk/test/wasm/Inputs/archive2.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @foo() local_unnamed_addr #1
define i32 @bar() local_unnamed_addr #0 {
Modified: lld/trunk/test/wasm/Inputs/call-indirect.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/call-indirect.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/call-indirect.ll (original)
+++ lld/trunk/test/wasm/Inputs/call-indirect.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
@indirect_bar = internal local_unnamed_addr global i64 ()* @bar, align 4
@indirect_foo = internal local_unnamed_addr global i32 ()* @foo, align 4
Modified: lld/trunk/test/wasm/Inputs/comdat1.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/comdat1.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/comdat1.ll (original)
+++ lld/trunk/test/wasm/Inputs/comdat1.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
$inlineFn = comdat any
@constantData = weak_odr constant [3 x i8] c"abc", comdat($inlineFn)
define linkonce_odr i32 @inlineFn() comdat {
Modified: lld/trunk/test/wasm/Inputs/comdat2.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/comdat2.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/comdat2.ll (original)
+++ lld/trunk/test/wasm/Inputs/comdat2.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
$inlineFn = comdat any
@constantData = weak_odr constant [3 x i8] c"abc", comdat($inlineFn)
define linkonce_odr i32 @inlineFn() comdat {
Modified: lld/trunk/test/wasm/Inputs/global-ctor-dtor.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/global-ctor-dtor.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/global-ctor-dtor.ll (original)
+++ lld/trunk/test/wasm/Inputs/global-ctor-dtor.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
define hidden void @myctor() {
entry:
ret void
Modified: lld/trunk/test/wasm/Inputs/hello.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/hello.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/hello.ll (original)
+++ lld/trunk/test/wasm/Inputs/hello.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Wasm module generated from the following C code:
; void puts(const char*);
; void hello() { puts("hello\n"); }
Modified: lld/trunk/test/wasm/Inputs/hidden.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/hidden.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/hidden.ll (original)
+++ lld/trunk/test/wasm/Inputs/hidden.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: norecurse nounwind readnone
define hidden i32 @archiveHidden() #0 {
entry:
Modified: lld/trunk/test/wasm/Inputs/locals-duplicate1.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/locals-duplicate1.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/locals-duplicate1.ll (original)
+++ lld/trunk/test/wasm/Inputs/locals-duplicate1.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Will collide: local (internal linkage) with global (external) linkage
@colliding_global1 = internal default global i32 0, align 4
; Will collide: global with local
Modified: lld/trunk/test/wasm/Inputs/locals-duplicate2.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/locals-duplicate2.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/locals-duplicate2.ll (original)
+++ lld/trunk/test/wasm/Inputs/locals-duplicate2.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Will collide: local (internal linkage) with global (external) linkage
@colliding_global1 = default global i32 0, align 4
; Will collide: global with local
Modified: lld/trunk/test/wasm/Inputs/many-funcs.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/many-funcs.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/many-funcs.ll (original)
+++ lld/trunk/test/wasm/Inputs/many-funcs.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
@g0 = global i32 1, align 4
@foo = global i32 1, align 4
Modified: lld/trunk/test/wasm/Inputs/ret32.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/ret32.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/ret32.ll (original)
+++ lld/trunk/test/wasm/Inputs/ret32.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: norecurse nounwind readnone
define i32 @ret32(float %arg) #0 {
entry:
Modified: lld/trunk/test/wasm/Inputs/ret64.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/ret64.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/ret64.ll (original)
+++ lld/trunk/test/wasm/Inputs/ret64.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
define i64 @ret64(double %arg) local_unnamed_addr #0 {
entry:
ret i64 1
Modified: lld/trunk/test/wasm/Inputs/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/weak-alias.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/weak-alias.ll (original)
+++ lld/trunk/test/wasm/Inputs/weak-alias.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: norecurse nounwind readnone
define i32 @direct_fn() #0 {
entry:
Modified: lld/trunk/test/wasm/Inputs/weak-symbol1.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/weak-symbol1.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/weak-symbol1.ll (original)
+++ lld/trunk/test/wasm/Inputs/weak-symbol1.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
define weak i32 @weakFn() #0 {
entry:
ret i32 1
Modified: lld/trunk/test/wasm/Inputs/weak-symbol2.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/weak-symbol2.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/weak-symbol2.ll (original)
+++ lld/trunk/test/wasm/Inputs/weak-symbol2.ll Tue Jan 23 19:29:47 2018
@@ -1,3 +1,5 @@
+target triple = "wasm32-unknown-unknown-wasm"
+
define weak i32 @weakFn() #0 {
entry:
ret i32 2
Modified: lld/trunk/test/wasm/alias.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/alias.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/alias.ll (original)
+++ lld/trunk/test/wasm/alias.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj -o %t.o %s
; RUN: lld -flavor wasm %t.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
@start_alias = alias i32 (), i32 ()* @_start
; Function Attrs: nounwind uwtable
Modified: lld/trunk/test/wasm/archive.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/archive.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/archive.ll (original)
+++ lld/trunk/test/wasm/archive.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,7 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/archive1.ll -o %t.a1.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/archive2.ll -o %t.a2.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/hello.ll -o %t.a3.o
+; RUN: llc -filetype=obj %s -o %t.o
+; RUN: llc -filetype=obj %S/Inputs/archive1.ll -o %t.a1.o
+; RUN: llc -filetype=obj %S/Inputs/archive2.ll -o %t.a2.o
+; RUN: llc -filetype=obj %S/Inputs/hello.ll -o %t.a3.o
; RUN: llvm-ar rcs %t.a %t.a1.o %t.a2.o %t.a3.o
; RUN: rm -f %t.imports
; RUN: not lld -flavor wasm %t.a %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=CHECK-UNDEFINED %s
@@ -13,6 +13,8 @@
; RUN: llvm-nm -a %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @foo() local_unnamed_addr #1
declare i32 @missing_func() local_unnamed_addr #1
Modified: lld/trunk/test/wasm/call-indirect.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/call-indirect.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/call-indirect.ll (original)
+++ lld/trunk/test/wasm/call-indirect.ll Tue Jan 23 19:29:47 2018
@@ -1,5 +1,5 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/call-indirect.ll -o %t2.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/call-indirect.ll -o %t2.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t2.o %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
@@ -8,6 +8,8 @@
; int (*indirect_func)(void) = &foo;
; void _start(void) { indirect_func(); }
+target triple = "wasm32-unknown-unknown-wasm"
+
@indirect_func = local_unnamed_addr global i32 ()* @foo, align 4
; Function Attrs: norecurse nounwind readnone
Modified: lld/trunk/test/wasm/comdats.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/comdats.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/comdats.ll (original)
+++ lld/trunk/test/wasm/comdats.ll Tue Jan 23 19:29:47 2018
@@ -4,6 +4,8 @@
; RUN: lld -flavor wasm -o %t.wasm %t.o %t1.o %t2.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @inlineFn()
define void @_start() local_unnamed_addr {
Modified: lld/trunk/test/wasm/conflict.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/conflict.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/conflict.test (original)
+++ lld/trunk/test/wasm/conflict.test Tue Jan 23 19:29:47 2018
@@ -1,4 +1,4 @@
-# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+# RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
# RUN: not lld -flavor wasm -o %t.wasm %t.ret32.o %t.ret32.o 2>&1 | FileCheck %s
# CHECK: duplicate symbol: ret32
Modified: lld/trunk/test/wasm/data-layout.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/data-layout.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/data-layout.ll (original)
+++ lld/trunk/test/wasm/data-layout.ll Tue Jan 23 19:29:47 2018
@@ -1,5 +1,7 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/hello.ll -o %t.hello.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/hello.ll -o %t.hello.o
+; RUN: llc -filetype=obj %s -o %t.o
+
+target triple = "wasm32-unknown-unknown-wasm"
@foo = hidden global i32 1, align 4
@aligned_bar = hidden global i32 3, align 16
Modified: lld/trunk/test/wasm/entry.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/entry.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/entry.ll (original)
+++ lld/trunk/test/wasm/entry.ll Tue Jan 23 19:29:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
+
+target triple = "wasm32-unknown-unknown-wasm"
define hidden void @entry() local_unnamed_addr #0 {
entry:
Modified: lld/trunk/test/wasm/export.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/export.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/export.ll (original)
+++ lld/trunk/test/wasm/export.ll Tue Jan 23 19:29:47 2018
@@ -1,8 +1,10 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: not lld -flavor wasm --export=missing -o %t.wasm %t.o 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
; RUN: lld -flavor wasm --export=hidden_function -o %t.wasm %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
define hidden i32 @hidden_function() local_unnamed_addr {
entry:
ret i32 0
Modified: lld/trunk/test/wasm/function-imports-first.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/function-imports-first.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/function-imports-first.ll (original)
+++ lld/trunk/test/wasm/function-imports-first.ll Tue Jan 23 19:29:47 2018
@@ -1,8 +1,10 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t.o %t.ret32.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: nounwind
define hidden void @_start() local_unnamed_addr #0 {
entry:
Modified: lld/trunk/test/wasm/function-imports.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/function-imports.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/function-imports.ll (original)
+++ lld/trunk/test/wasm/function-imports.ll Tue Jan 23 19:29:47 2018
@@ -1,8 +1,10 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t.ret32.o %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: nounwind
define hidden void @_start() local_unnamed_addr #0 {
entry:
Modified: lld/trunk/test/wasm/function-index.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/function-index.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/function-index.test (original)
+++ lld/trunk/test/wasm/function-index.test Tue Jan 23 19:29:47 2018
@@ -1,5 +1,5 @@
-# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
-# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret64.ll -o %t.ret64.o
+# RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
+# RUN: llc -filetype=obj %p/Inputs/ret64.ll -o %t.ret64.o
# RUN: lld -flavor wasm -r -o %t.wasm %t.ret32.o %t.ret64.o
# RUN: obj2yaml %t.wasm | FileCheck %s
Modified: lld/trunk/test/wasm/import-memory.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/import-memory.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/import-memory.test (original)
+++ lld/trunk/test/wasm/import-memory.test Tue Jan 23 19:29:47 2018
@@ -1,4 +1,4 @@
-# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+# RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
# RUN: lld -flavor wasm -entry ret32 --import-memory -o %t.wasm %t.ret32.o
# RUN: obj2yaml %t.wasm | FileCheck %s
Modified: lld/trunk/test/wasm/init-fini.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/init-fini.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/init-fini.ll (original)
+++ lld/trunk/test/wasm/init-fini.ll Tue Jan 23 19:29:47 2018
@@ -1,5 +1,7 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o
+; RUN: llc -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o
+
+target triple = "wasm32-unknown-unknown-wasm"
define hidden void @func1() {
entry:
Copied: lld/trunk/test/wasm/invalid-stack-size.ll (from r323288, lld/trunk/test/wasm/invalid-stack-size.test)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/invalid-stack-size.ll?p2=lld/trunk/test/wasm/invalid-stack-size.ll&p1=lld/trunk/test/wasm/invalid-stack-size.test&r1=323288&r2=323299&rev=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/invalid-stack-size.test (original)
+++ lld/trunk/test/wasm/invalid-stack-size.ll Tue Jan 23 19:29:47 2018
@@ -1,6 +1,8 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: not lld -flavor wasm -o %t.wasm -z stack-size=1 %t.o 2>&1 | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
define i32 @_start() local_unnamed_addr #1 {
entry:
ret i32 0
Removed: lld/trunk/test/wasm/invalid-stack-size.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/invalid-stack-size.test?rev=323298&view=auto
==============================================================================
--- lld/trunk/test/wasm/invalid-stack-size.test (original)
+++ lld/trunk/test/wasm/invalid-stack-size.test (removed)
@@ -1,9 +0,0 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %s -o %t.o
-; RUN: not lld -flavor wasm -o %t.wasm -z stack-size=1 %t.o 2>&1 | FileCheck %s
-
-define i32 @_start() local_unnamed_addr #1 {
-entry:
- ret i32 0
-}
-
-; CHECK: error: stack size must be 16-byte aligned
Modified: lld/trunk/test/wasm/load-undefined.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/load-undefined.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/load-undefined.ll (original)
+++ lld/trunk/test/wasm/load-undefined.ll Tue Jan 23 19:29:47 2018
@@ -1,13 +1,15 @@
; Verify that the -u / --undefined option is able to pull in symbols from
; an archive, and doesn't error when uses to pull in a symbol already loaded.
;
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/ret64.ll -o %t.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/ret32.ll -o %t2.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t3.o
+; RUN: llc -filetype=obj %S/Inputs/ret64.ll -o %t.o
+; RUN: llc -filetype=obj %S/Inputs/ret32.ll -o %t2.o
+; RUN: llc -filetype=obj %s -o %t3.o
; RUN: llvm-ar rcs %t2.a %t2.o
; RUN: lld -flavor wasm %t3.o %t2.a %t.o -o %t.wasm -u ret32 --undefined ret64
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
define i32 @_start() local_unnamed_addr {
entry:
ret i32 1
Modified: lld/trunk/test/wasm/local-symbols.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/local-symbols.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/local-symbols.ll (original)
+++ lld/trunk/test/wasm/local-symbols.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
@foo = default global i32 1, align 4
@bar = internal default global i32 3, align 4
Modified: lld/trunk/test/wasm/locals-duplicate.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/locals-duplicate.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/locals-duplicate.test (original)
+++ lld/trunk/test/wasm/locals-duplicate.test Tue Jan 23 19:29:47 2018
@@ -1,5 +1,5 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/locals-duplicate1.ll -o %t1.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/locals-duplicate2.ll -o %t2.o
+; RUN: llc -filetype=obj %p/Inputs/locals-duplicate1.ll -o %t1.o
+; RUN: llc -filetype=obj %p/Inputs/locals-duplicate2.ll -o %t2.o
; RUN: lld -flavor wasm --no-entry -o %t.wasm %t1.o %t2.o
; RUN: obj2yaml %t.wasm | FileCheck %s
Modified: lld/trunk/test/wasm/many-functions.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/many-functions.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/many-functions.ll (original)
+++ lld/trunk/test/wasm/many-functions.ll Tue Jan 23 19:29:47 2018
@@ -1,5 +1,5 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/many-funcs.ll -o %t.many.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/many-funcs.ll -o %t.many.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -r -o %t.wasm %t.many.o %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
@@ -8,6 +8,8 @@
; 128 function and so the final output requires a 2-byte LEB in
; the CODE section header to store the function count.
+target triple = "wasm32-unknown-unknown-wasm"
+
define i32 @func() {
entry:
%call = tail call i32 @func()
Modified: lld/trunk/test/wasm/relocatable.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/relocatable.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/relocatable.ll (original)
+++ lld/trunk/test/wasm/relocatable.ll Tue Jan 23 19:29:47 2018
@@ -1,8 +1,10 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/hello.ll -o %t.hello.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/hello.ll -o %t.hello.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -r -o %t.wasm %t.hello.o %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: nounwind
define hidden i32 @my_func() local_unnamed_addr {
entry:
Modified: lld/trunk/test/wasm/signature-mismatch.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/signature-mismatch.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/signature-mismatch.ll (original)
+++ lld/trunk/test/wasm/signature-mismatch.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.main.o
+; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
+; RUN: llc -filetype=obj %s -o %t.main.o
; RUN: not lld -flavor wasm --check-signatures -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: nounwind
define hidden void @_start() local_unnamed_addr #0 {
entry:
Modified: lld/trunk/test/wasm/stack-pointer.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/stack-pointer.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/stack-pointer.ll (original)
+++ lld/trunk/test/wasm/stack-pointer.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm --relocatable -o %t.wasm %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; Function Attrs: nounwind
define i32 @_start() local_unnamed_addr {
entry:
Modified: lld/trunk/test/wasm/strip-debug.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/strip-debug.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/strip-debug.test (original)
+++ lld/trunk/test/wasm/strip-debug.test Tue Jan 23 19:29:47 2018
@@ -1,4 +1,4 @@
-RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
RUN: lld -flavor wasm --strip-debug --entry=ret32 -o %t.wasm %t.ret32.o
RUN: obj2yaml %t.wasm | FileCheck %s
Modified: lld/trunk/test/wasm/symbol-type-mismatch.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/symbol-type-mismatch.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/symbol-type-mismatch.ll (original)
+++ lld/trunk/test/wasm/symbol-type-mismatch.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+; RUN: llc -filetype=obj %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
; RUN: not lld -flavor wasm -o %t.wasm %t.o %t.ret32.o 2>&1 | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
@ret32 = extern_weak global i32, align 4
; CHECK: error: symbol type mismatch: ret32
Modified: lld/trunk/test/wasm/undefined-entry.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/undefined-entry.test?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/undefined-entry.test (original)
+++ lld/trunk/test/wasm/undefined-entry.test Tue Jan 23 19:29:47 2018
@@ -1,4 +1,4 @@
-RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o
+RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
RUN: not lld -flavor wasm -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s
CHECK: error: undefined symbol: _start
Modified: lld/trunk/test/wasm/undefined.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/undefined.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/undefined.ll (original)
+++ lld/trunk/test/wasm/undefined.ll Tue Jan 23 19:29:47 2018
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm --allow-undefined -o %t.wasm %t.o
; Fails due to undefined 'foo'
@@ -9,6 +9,8 @@
; RUN: echo 'foo' > %t.txt
; RUN: lld -flavor wasm --allow-undefined-file=%t.txt -o %t.wasm %t.o
+target triple = "wasm32-unknown-unknown-wasm"
+
; Takes the address of the external foo() resulting in undefined external
@bar = hidden local_unnamed_addr global i8* bitcast (i32 ()* @foo to i8*), align 4
Modified: lld/trunk/test/wasm/version.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/version.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/version.ll (original)
+++ lld/trunk/test/wasm/version.ll Tue Jan 23 19:29:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t.o
; RUN: llvm-readobj -file-headers %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
define hidden void @_start() local_unnamed_addr #0 {
entry:
ret void
Modified: lld/trunk/test/wasm/visibility-hidden.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/visibility-hidden.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/visibility-hidden.ll (original)
+++ lld/trunk/test/wasm/visibility-hidden.ll Tue Jan 23 19:29:47 2018
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/hidden.ll -o %t2.o
+; RUN: llc -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj %S/Inputs/hidden.ll -o %t2.o
; RUN: llvm-ar rcs %t2.a %t2.o
; RUN: lld -flavor wasm %t.o %t2.a -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
@@ -7,6 +7,8 @@
; Test that hidden symbols are not exported, whether pulled in from an archive
; or directly.
+target triple = "wasm32-unknown-unknown-wasm"
+
define hidden i32 @objectHidden() {
entry:
ret i32 0
Modified: lld/trunk/test/wasm/weak-alias-overide.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-alias-overide.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-alias-overide.ll (original)
+++ lld/trunk/test/wasm/weak-alias-overide.ll Tue Jan 23 19:29:47 2018
@@ -1,11 +1,13 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
+; RUN: llc -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: lld -flavor wasm %t.o %t2.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
; Test that the strongly defined alias_fn from this file is used both here
; and in call_alias.
+target triple = "wasm32-unknown-unknown-wasm"
+
define i32 @alias_fn() local_unnamed_addr #1 {
ret i32 1
}
Modified: lld/trunk/test/wasm/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-alias.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-alias.ll (original)
+++ lld/trunk/test/wasm/weak-alias.ll Tue Jan 23 19:29:47 2018
@@ -1,10 +1,12 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
+; RUN: llc -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: lld -flavor wasm %t.o %t2.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
; Test that weak aliases (alias_fn is a weak alias of direct_fn) are linked correctly
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @alias_fn() local_unnamed_addr #1
; Function Attrs: nounwind uwtable
Modified: lld/trunk/test/wasm/weak-symbols.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-symbols.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-symbols.ll (original)
+++ lld/trunk/test/wasm/weak-symbols.ll Tue Jan 23 19:29:47 2018
@@ -1,9 +1,11 @@
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/weak-symbol1.ll -o %t1.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/weak-symbol2.ll -o %t2.o
-; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o
+; RUN: llc -filetype=obj %p/Inputs/weak-symbol1.ll -o %t1.o
+; RUN: llc -filetype=obj %p/Inputs/weak-symbol2.ll -o %t2.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: lld -flavor wasm -o %t.wasm %t.o %t1.o %t2.o
; RUN: obj2yaml %t.wasm | FileCheck %s
+target triple = "wasm32-unknown-unknown-wasm"
+
declare i32 @weakFn() local_unnamed_addr
@weakGlobal = external global i32
Modified: lld/trunk/test/wasm/weak-undefined.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-undefined.ll?rev=323299&r1=323298&r2=323299&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-undefined.ll (original)
+++ lld/trunk/test/wasm/weak-undefined.ll Tue Jan 23 19:29:47 2018
@@ -1,10 +1,12 @@
-; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s
+; RUN: llc -filetype=obj -o %t.o %s
; RUN: lld -flavor wasm -strip-debug %t.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s
; Test that undefined weak externals (global_var) and (foo) don't cause
; link failures and resolve to zero.
+target triple = "wasm32-unknown-unknown-wasm"
+
@global_var = extern_weak global i32, align 4
declare extern_weak i32 @foo()
More information about the llvm-commits
mailing list