[PATCH] D123308: Handle a subtle hole in inline builtin handling
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 7 10:21:35 PDT 2022
nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.
Thanks for the quick fix!
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:4968-4969
// name to make it clear it's not the actual builtin.
- if (FD->isInlineBuiltinDeclaration() &&
+ if (OnlyHasInlineBuiltinDeclaration(FD) &&
CGF.CurFn->getName() != FDInlineName) {
llvm::Constant *CalleePtr = EmitFunctionDeclPointer(CGF.CGM, GD);
----------------
If `OnlyHasInlineBuiltinDeclaration` returning `false` is unusual, can we get away with switching the order of the checks here, so that `CGF.CurFn->getName() != FDInlineName` which might be more likely might short circuit the conditional? That might help us avoid walking the redecl list in `OnlyHasInlineBuiltinDeclaration` occasionally.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123308/new/
https://reviews.llvm.org/D123308
More information about the cfe-commits
mailing list