[clang] [llvm] [SystemZ] Global Stackprotector and associated location section (PR #169317)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 2 07:23:03 PST 2026


================
@@ -1194,6 +1194,14 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
     }
   }
 
+  if (CGM.getCodeGenOpts().StackProtectorGuardRecord) {
+    if (CGM.getCodeGenOpts().StackProtectorGuard != "global")
+      CGM.getDiags().Report(diag::err_opt_not_valid_without_opt)
+          << "-mstack-protector-guard-record"
+          << "-mstack-protector-guard=global";
+    Fn->addFnAttr("mstackprotector-guard-record");
----------------
arsenm wrote:

Why the m prefix? And should this really be a module flag? Should also be documented 

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


More information about the cfe-commits mailing list