Aaron Ballman adc402bf3d Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the eleventh batch of tests being updated (there are a
significant number of other tests left to be updated).
2022-02-15 16:06:43 -05:00

22 lines
779 B
C

// RUN: %clang_cc1 -fprofile-instrument=llvm -disable-llvm-passes \
// RUN: -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=csllvm -disable-llvm-passes \
// RUN: -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -disable-llvm-passes \
// RUN: -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fprofile-arcs -disable-llvm-passes \
// RUN: -emit-llvm -o - %s | FileCheck %s
int g(int);
void __attribute__((no_profile_instrument_function)) no_instr(void) {
// CHECK: define {{.*}}void @no_instr() [[ATTR:#[0-9]+]]
}
void instr(void) {
// CHECK: define {{.*}}void @instr() [[ATTR2:#[0-9]+]]
}
// CHECK: attributes [[ATTR]] = {{.*}} noprofile
// CHECK: attributes [[ATTR2]] = {
// CHECK-NOT: noprofile
// CHECK: }