aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2023-03-06 13:37:32 +0100
committerHans Wennborg <hans@chromium.org>2023-03-16 11:02:27 +0100
commit7a85aa918ccd7bba0e3be94436c62432c08d357a (patch)
treed5cfa10a1a33088c4eb0f5d433918383f84070e5 /clang/lib/CodeGen/CodeGenModule.h
parent44e03d64881730430c83aee9bff95f1d855660f8 (diff)
downloadllvm-7a85aa918ccd7bba0e3be94436c62432c08d357a.zip
llvm-7a85aa918ccd7bba0e3be94436c62432c08d357a.tar.gz
llvm-7a85aa918ccd7bba0e3be94436c62432c08d357a.tar.bz2
Emit const globals with constexpr destructor as constant LLVM values
This follows 2b4fa53 which made Clang not emit destructor calls for such objects. However, they would still not get emitted as constants since CodeGenModule::isTypeConstant() returns false if the destructor is constexpr. This change adds a param to make isTypeConstant() ignore the dtor, allowing the caller to check it instead. Fixes Issue #61212 Differential revision: https://reviews.llvm.org/D145369
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index b335465..64c2902 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -816,7 +816,7 @@ public:
return getTBAAAccessInfo(AccessType);
}
- bool isTypeConstant(QualType QTy, bool ExcludeCtorDtor);
+ bool isTypeConstant(QualType QTy, bool ExcludeCtor, bool ExcludeDtor);
bool isPaddedAtomicType(QualType type);
bool isPaddedAtomicType(const AtomicType *type);