================
@@ -2316,6 +2316,12 @@ static void getTrivialDefaultFunctionAttributes(
       FuncAttrs.addAttribute("backchain");
     if (CodeGenOpts.EnableSegmentedStacks)
       FuncAttrs.addAttribute("split-stack");
+    if (!CodeGenOpts.StackLimitVariable.empty()) {
+      FuncAttrs.addAttribute("stack-limit-variable",
+                             CodeGenOpts.StackLimitVariable);
+      FuncAttrs.addAttribute("stack-limit-trap-number",
+                             llvm::utostr(CodeGenOpts.StackLimitTrapNumber));
----------------
nikic wrote:

New attributes must be specified in LangRef.

We should not have string references to globals though. This needs to be 
encoded in a way that actually references a proper GlobalVariable declaration. 
(I guess you could do function metadata for that?)

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

Reply via email to