[PATCH] D91816: [Inline] prevent inlining on stack protector mismatch

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 13:01:51 PST 2020


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/IR/Attributes.cpp:1942
 static void adjustCallerSSPLevel(Function &Caller, const Function &Callee) {
+  assert(!(!Callee.hasStackProtectorFnAttr() &&
+           Caller.hasStackProtectorFnAttr() &&
----------------
MaskRay wrote:
> Hmm. Perhaps `if (!Callee.hasFnAttribute(Attribute::AlwaysInline)) { assert(); assert(); }` can simplify the conditions a bit.
Oh, sure, the two `if`s I added share that condition. Should I wrap that in `#ifndef NDEBUG`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91816



More information about the llvm-commits mailing list