================
@@ -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");
----------------
dominik-steenken wrote:

It was my understanding that the `m` prefix is for machine-specific options, 
and this one is supposed to by only available for SystemZ.

I'm not sure whether this needs to be a module flag - it's meant to be a global 
modifier to the `stack-protector-guard=global` setting, making sure that all 
loads of the stack guard addrress are documented in that special section. I 
suppose that means attaching it to the module makes more sense than attaching 
it to the function, yes.

Where does this need to be documented beyond the help text supplied in 
`Options.td`?

https://github.com/llvm/llvm-project/pull/169317
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to