diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-11 13:44:52 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-09-11 13:44:52 +0000 |
| commit | 8092e001bcd76c0b9fec2311f3a515aa60d2ed07 (patch) | |
| tree | 11ad04f2dd7ba4fa65e4f3e402399dfc7deb68ea /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | c938c0a643200ec844981864ac587bc6c1f576aa (diff) | |
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a3506df7d4e5..f09d1129b128 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2386,7 +2386,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, // functions. If the current target's C++ ABI requires this and this is a // member function, set its alignment accordingly. 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())); } |
