[PATCH] D159339: [urgent][CodeGen] First check the kind and then the llvm::Function properties.
David Tenty via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 1 11:27:13 PDT 2023
daltenty added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2389
if (getTarget().getCXXABI().areMemberFunctionsAligned()) {
- if (F->getPointerAlignment(getDataLayout()) < 2 && isa<CXXMethodDecl>(D))
+ if (isa<CXXMethodDecl>(D) && F->getPointerAlignment(getDataLayout()) < 2)
F->setAlignment(std::max(llvm::Align(2), F->getAlign().valueOrOne()));
----------------
Thanks for looking into this.
It's not clear to me how this re-ordering ends up fixing things. Can you clarify what the uninitialized value was in this expression?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159339/new/
https://reviews.llvm.org/D159339
More information about the cfe-commits
mailing list