aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/RISCV/attr-hw-shadow-stack.c
blob: 8dfdc8c044cae1942cae471526ec30f9d2cb1a43 (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -triple riscv64 -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck %s
// RUN: %clang_cc1 -triple riscv64 -target-feature +zimop -emit-llvm -o - %s | FileCheck -check-prefix=NOSHADOWSTACK %s
// RUN: %clang_cc1 -triple riscv32 -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck %s
// RUN: %clang_cc1 -triple riscv32 -target-feature +zimop -emit-llvm -o - %s | FileCheck -check-prefix=NOSHADOWSTACK %s

int foo(int *a) { return *a; }

// CHECK: attributes {{.*}}"hw-shadow-stack"{{.*}}
// NOSHADOWSTACK-NOT: attributes {{.*}}"hw-shadow-stack"{{.*}}