[PATCH] D91816: [Inline] prevent inlining on stack protector mismatch
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 13:56:59 PST 2020
MaskRay added inline comments.
================
Comment at: llvm/lib/IR/Attributes.cpp:1942
static void adjustCallerSSPLevel(Function &Caller, const Function &Callee) {
+ assert(!(!Callee.hasStackProtectorFnAttr() &&
+ Caller.hasStackProtectorFnAttr() &&
----------------
nickdesaulniers wrote:
> 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`?
LG
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