Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / X86 / x86-cf-protection.c
blobba63b9e17c6f63d0929f01d70db77a4f38d3f306
1 // RUN: %clang_cc1 -E -triple i386 -dM -o - -fcf-protection=return %s | FileCheck %s --check-prefix=RETURN
2 // RUN: %clang_cc1 -E -triple i386 -dM -o - -fcf-protection=branch %s | FileCheck %s --check-prefix=BRANCH
3 // RUN: %clang_cc1 -E -triple i386 -dM -o - -fcf-protection=full %s | FileCheck %s --check-prefix=FULL
4 // RUN: not %clang_cc1 -emit-llvm-only -triple i386 -target-cpu pentium-mmx -fcf-protection=branch %s 2>&1 | FileCheck %s --check-prefix=NOCFPROT
6 // RETURN: #define __CET__ 2
7 // BRANCH: #define __CET__ 1
8 // FULL: #define __CET__ 3
9 // CFPROT: !{i32 8, !"cf-protection-branch", i32 1}
11 // NOCFPROT: error: option 'cf-protection=branch' cannot be specified on this target
13 void foo() {}