[PATCH] D119996: [safestack] Support safestack in stack size diagnostics

Roland McGrath via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 4 18:54:25 PST 2022


mcgrathr added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1211
   const MachineFrameInfo &FrameInfo = MF.getFrameInfo();
-  uint64_t StackSize = FrameInfo.getStackSize();
+  uint64_t StackSize =
+      FrameInfo.getStackSize() + FrameInfo.getUnsafeStackSize();
----------------
Should we also update emitStackSizeSection to match?
I'm not sure whether that's meant to be used for diagnostic-like cases or for more concrete backend uses where the distinction between the two stacks still matters.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119996/new/

https://reviews.llvm.org/D119996



More information about the cfe-commits mailing list