1 // Test that we serialize the enum decl in the function prototype somehow.
2 // These decls aren't serialized quite the same way as parameters.
3
4 // Test this without pch.
5 // RUN: %clang_cc1 -include %s -emit-llvm -o - %s | FileCheck %s
6
7 // Test with pch.
8 // RUN: %clang_cc1 -emit-pch -o %t %s
9 // RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s | FileCheck %s
10
11 // CHECK-LABEL: define {{.*}}i32 @main()
12 // CHECK: ret i32 1
13
14 #ifndef HEADER
15 #define HEADER
16
f(enum{ x, y } p)17 static inline __attribute__((always_inline)) f(enum { x, y } p) {
18 return y;
19 }
20
21 #else
22
main()23 int main() {
24 return f(0);
25 }
26
27 #endif
28