summaryrefslogtreecommitdiff
path: root/test/wasm/lto/internalize-basic.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:08:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:08:33 +0000
commit20d35e67e67f106f617c939725101223211659f0 (patch)
tree64eb963cbf5ba58765e0a6b64a440965d66a7a4d /test/wasm/lto/internalize-basic.ll
parentae1a339de31cf4065777531959a11e55a2e5fa00 (diff)
Notes
Diffstat (limited to 'test/wasm/lto/internalize-basic.ll')
-rw-r--r--test/wasm/lto/internalize-basic.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/wasm/lto/internalize-basic.ll b/test/wasm/lto/internalize-basic.ll
new file mode 100644
index 0000000000000..313a05ecbae41
--- /dev/null
+++ b/test/wasm/lto/internalize-basic.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as %s -o %t.o
+; RUN: wasm-ld %t.o -o %t2 -save-temps
+; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
+target triple = "wasm32-unknown-unknown-wasm"
+
+define void @_start() {
+ ret void
+}
+
+define hidden void @foo() {
+ ret void
+}
+
+; Check that _start is not internalized.
+; CHECK: define void @_start()
+
+; Check that foo function is correctly internalized.
+; CHECK: define internal void @foo()