[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)
Jesse Huang via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 10:37:38 PDT 2024
================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck -check-prefix=NOTIGNORELISTED %s
+// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s | FileCheck -check-prefix=IGNORELISTED %s
+
+int foo(int *a) { return *a; }
+
+// CHECK: define i32 @foo(ptr %a)
+
+// IGNORELISTED-NOT: attributes {{.*}}"hw-shadow-stack"{{.*}}
+// NOTIGNORELISTED: attributes {{.*}}"hw-shadow-stack"{{.*}}
----------------
jaidTw wrote:
Changed to a more descriptive name
https://github.com/llvm/llvm-project/pull/112477
More information about the cfe-commits
mailing list