summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/x86-cf-protection.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/x86-cf-protection.c')
-rw-r--r--clang/test/CodeGen/x86-cf-protection.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/test/CodeGen/x86-cf-protection.c b/clang/test/CodeGen/x86-cf-protection.c
index 044f839c348..7197dacc4ba 100644
--- a/clang/test/CodeGen/x86-cf-protection.c
+++ b/clang/test/CodeGen/x86-cf-protection.c
@@ -1,6 +1,8 @@
-// RUN: not %clang_cc1 -fsyntax-only -S -o %t -triple i386-unknown-unknown -fcf-protection=return %s 2>&1 | FileCheck %s --check-prefix=RETURN
-// RUN: not %clang_cc1 -fsyntax-only -S -o %t -triple i386-unknown-unknown -fcf-protection=branch %s 2>&1 | FileCheck %s --check-prefix=BRANCH
+// RUN: %clang -target i386-unknown-unknown -x c -E -dM -o - -fcf-protection=return %s | FileCheck %s --check-prefix=RETURN
+// RUN: %clang -target i386-unknown-unknown -x c -E -dM -o - -fcf-protection=branch %s | FileCheck %s --check-prefix=BRANCH
+// RUN: %clang -target i386-unknown-unknown -x c -E -dM -o - -fcf-protection=full %s | FileCheck %s --check-prefix=FULL
-// RETURN: error: option 'cf-protection=return' cannot be specified without '-mshstk'
-// BRANCH: error: option 'cf-protection=branch' cannot be specified without '-mibt'
+// RETURN: #define __CET__ 2
+// BRANCH: #define __CET__ 1
+// FULL: #define __CET__ 3
void foo() {}
OpenPOWER on IntegriCloud