10 lines · c
1// RUN: %clang_cc1 -triple riscv64 -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck %s2// RUN: %clang_cc1 -triple riscv64 -target-feature +zimop -emit-llvm -o - %s | FileCheck -check-prefix=NOSHADOWSTACK %s3// RUN: %clang_cc1 -triple riscv32 -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck %s4// RUN: %clang_cc1 -triple riscv32 -target-feature +zimop -emit-llvm -o - %s | FileCheck -check-prefix=NOSHADOWSTACK %s5 6int foo(int *a) { return *a; }7 8// CHECK: attributes {{.*}}"hw-shadow-stack"{{.*}}9// NOSHADOWSTACK-NOT: attributes {{.*}}"hw-shadow-stack"{{.*}}10