[clang] [llvm] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)
Ming-Yi Lai via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 24 02:35:11 PDT 2024
================
@@ -607,6 +607,9 @@ class RISCVTargetCodeGenInfo : public TargetCodeGenInfo {
auto *Fn = cast<llvm::Function>(GV);
Fn->addFnAttr("interrupt", Kind);
+
+ if (CGM.getCodeGenOpts().CFProtectionReturn)
----------------
mylai-mtk wrote:
The early exit above may render this line unreachable for normal functions.
https://github.com/llvm/llvm-project/pull/112477
More information about the cfe-commits
mailing list