Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / decl-in-prototype.c
blob12dd96073a9c4c49381e314c6ee0b6eb73ce9ac9
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.
4 // Test this without pch.
5 // RUN: %clang_cc1 -include %s -emit-llvm -o - %s | FileCheck %s
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
11 // CHECK-LABEL: define {{.*}}i32 @main()
12 // CHECK: ret i32 1
14 #ifndef HEADER
15 #define HEADER
17 static inline __attribute__((always_inline)) int f(enum { x, y } p) {
18 return y;
21 #else
23 int main(void) {
24 return f(0);
27 #endif