[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 11 11:57:24 PDT 2025


================
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
   SignAndAuth
 };
 
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip = "strip";
----------------
AaronBallman wrote:

> I was meaning "is there a more idiomatic way to have these string constants specified?" :D

Usually we'd do what @erichkeane was suggesting -- not have these as constants in LangOptions.h but instead have helper functions which convert string -> enum -> string. Then these strings can be hidden within a .cpp file rather than exposed in a header with broader visibility. WDYT?

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


More information about the cfe-commits mailing list