summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/wasm-import-name.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/wasm-import-name.c')
-rw-r--r--test/CodeGen/wasm-import-name.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/wasm-import-name.c b/test/CodeGen/wasm-import-name.c
new file mode 100644
index 0000000000..7c3b094b9e
--- /dev/null
+++ b/test/CodeGen/wasm-import-name.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown-wasm -emit-llvm -o - %s | FileCheck %s
+
+void __attribute__((import_name("bar"))) foo(void);
+
+void call(void) {
+ foo();
+}
+
+// CHECK: declare void @foo() [[A:#[0-9]+]]
+
+// CHECK: attributes [[A]] = {{{.*}} "wasm-import-name"="bar" {{.*}}}