[PATCH] D87956: [WIP][IR] add fn attr for no_stack_protector; prevent inlining ssp into no-ssp

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 15:03:15 PDT 2020


nickdesaulniers added inline comments.


================
Comment at: llvm/docs/BitCodeFormat.rst:953
   base 2 of the requested alignment, plus 1
+* bit 40: ``nossp``
 
----------------
ah, I should remove this; this block is legacy encodings which I do not modify.


================
Comment at: llvm/lib/IR/Verifier.cpp:1977-1984
+    if (Attrs.hasFnAttribute(Attribute::NoStackProtect))
+      ++N;
+    if (Attrs.hasFnAttribute(Attribute::StackProtect))
+      ++N;
+    if (Attrs.hasFnAttribute(Attribute::StackProtectReq))
+      ++N;
+    if (Attrs.hasFnAttribute(Attribute::StackProtectStrong))
----------------
I'd love to cast these booleans to `unsigned` and add them, but I find that all of the `static_casts` don't really make this more concise.  Thoughts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87956



More information about the cfe-commits mailing list