summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/x86-cf-protection.c
blob: c853791d2ddd1d9f72d365283dfdb945c83c473e (plain)
1
2
3
4
5
6
// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm -o %t -triple i386-unknown-unknown -fcf-protection=return %s 2>&1 | FileCheck %s --check-prefix=RETURN
// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm -o %t -triple i386-unknown-unknown -fcf-protection=branch %s 2>&1 | FileCheck %s --check-prefix=BRANCH

// RETURN: error: option 'cf-protection=return' cannot be specified without '-mshstk'
// BRANCH: error: option 'cf-protection=branch' cannot be specified without '-mibt'
void foo() {}
OpenPOWER on IntegriCloud