summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/wasm-import-name.c
blob: 7c3b094b9e435c72f4b43bd941240e284daef228 (plain)
1
2
3
4
5
6
7
8
9
10
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" {{.*}}}