summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/no-prototype.c
blob: 6030357b70f79cdd8a1e06c68bc14ed8dfd46bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// REQUIRES: webassembly-registered-target
// RUN: %clang_cc1 -triple wasm32 -emit-llvm %s -o - | FileCheck %s

int foo();

int bar(int a) {
  return foo();
}

int baz() {
  return foo();
}

// CHECK: define i32 @bar(i32 %a) [[BAR_ATTR:#[0-9]+]] {
// CHECK: declare i32 @foo(...) [[FOO_ATTR:#[0-9]+]]
// CHECK: define i32 @baz() [[BAZ_ATTR:#[0-9]+]] {

// CHECK: attributes [[FOO_ATTR]] = {  {{.*}}"no-prototype"{{.*}} }
// CHECK-NOT: attributes [[BAR_ATTR]] = {  {{.*}}"no-prototype"{{.*}} }
// CHECK-NOT: attributes [[BAZ_ATTR]] = {  {{.*}}"no-prototype"{{.*}} }