[libunwind] [llvm] [MC][AArch64] Add .cfi_set_ra_state for PAuth_LR (PR #209949)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 11:47:58 PDT 2026


================
@@ -7557,6 +7560,34 @@ bool AArch64AsmParser::parseDirectiveCFINegateRAStateWithPC() {
   return false;
 }
 
+/// parseDirectiveCFILLVMSetRAState
+/// ::= .cfi_set_ra_state ra_state, offset
+/// ::= .cfi_set_ra_state ra_state, pac_sym
+bool AArch64AsmParser::parseDirectiveCFILLVMSetRAState() {
----------------
s-barannikov wrote:

The boolean `true` returned by the old `ParseDirective` was umbiguous. It meant either "parsing failed" or "directive doesn't need target-specific handling".
To disambiguate, we check if there are any pending errors after the function returns. The new `parseDirective` returns a three-state type; targets should migrate to using it. I migrated a couple of targets that had negative tests for directive parsing, but AArch64 was over my head.


https://github.com/llvm/llvm-project/pull/209949


More information about the cfe-commits mailing list