summaryrefslogtreecommitdiffstats
path: root/lld/test/wasm/entry.ll
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-11-17 18:14:09 +0000
committerSam Clegg <sbc@chromium.org>2017-11-17 18:14:09 +0000
commitc94d393ad52b6698b15400ee7a33a68b4bda274b (patch)
tree2609add8ef4574c40a55c0604abd6a98d6e4857a /lld/test/wasm/entry.ll
parentae304b07176190a69853d3430c7206146ac8d0e6 (diff)
downloadbcm5719-llvm-c94d393ad52b6698b15400ee7a33a68b4bda274b.tar.gz
bcm5719-llvm-c94d393ad52b6698b15400ee7a33a68b4bda274b.zip
[WebAssembly] Initial wasm linker implementation
This linker backend is still a work in progress but is enough to link simple programs including linking against library archives. Differential Revision: https://reviews.llvm.org/D34851 llvm-svn: 318539
Diffstat (limited to 'lld/test/wasm/entry.ll')
-rw-r--r--lld/test/wasm/entry.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/lld/test/wasm/entry.ll b/lld/test/wasm/entry.ll
new file mode 100644
index 00000000000..65a1e39f533
--- /dev/null
+++ b/lld/test/wasm/entry.ll
@@ -0,0 +1,22 @@
+; RUN: llc -filetype=obj %s -o %t.o
+; RUN: lld -flavor wasm -e entry -o %t.wasm %t.o
+; RUN: obj2yaml %t.wasm | FileCheck %s
+; RUN: lld -flavor wasm --entry=entry -o %t.wasm %t.o
+; RUN: obj2yaml %t.wasm | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
+target triple = "wasm32-unknown-unknown-wasm"
+
+define hidden void @entry() local_unnamed_addr #0 {
+entry:
+ ret void
+}
+
+; CHECK: - Type: EXPORT
+; CHECK: Exports:
+; CHECK: - Name: memory
+; CHECK: Kind: MEMORY
+; CHECK: Index: 0
+; CHECK: - Name: entry
+; CHECK: Kind: FUNCTION
+; CHECK: Index: 0
OpenPOWER on IntegriCloud