| 1 |
// REQUIRES: webassembly-registered-target |
| 2 |
// RUN: %clang_cc1 -triple wasm32 -emit-llvm %s -o - | FileCheck %s |
| 3 |
|
| 4 |
int foo(); |
| 5 |
|
| 6 |
int bar(int a) { |
| 7 |
return foo(); |
| 8 |
} |
| 9 |
|
| 10 |
int baz() { |
| 11 |
return foo(); |
| 12 |
} |
| 13 |
|
| 14 |
// CHECK: define i32 @bar(i32 noundef %a) [[BAR_ATTR:#[0-9]+]] { |
| 15 |
// CHECK: declare i32 @foo(...) [[FOO_ATTR:#[0-9]+]] |
| 16 |
// CHECK: define i32 @baz() [[BAZ_ATTR:#[0-9]+]] { |
| 17 |
|
| 18 |
// CHECK: attributes [[FOO_ATTR]] = { {{.*}}"no-prototype"{{.*}} } |
| 19 |
// CHECK-NOT: attributes [[BAR_ATTR]] = { {{.*}}"no-prototype"{{.*}} } |
| 20 |
// CHECK-NOT: attributes [[BAZ_ATTR]] = { {{.*}}"no-prototype"{{.*}} } |