================
@@ -636,27 +636,27 @@ CodeGenModule::computeVTPointerAuthentication(const
CXXRecordDecl *ThisClass,
}
std::optional<PointerAuthQualifier>
-CodeGenModule::getVTablePointerAuthentication(const CXXRecordDecl *Record) {
+CodeGenModule::getVTablePointerAuthentication(const CXXRecordDecl *Record,
+ bool IsVTTEntry) {
if (!Record->getDefinition() || !Record->isPolymorphic())
return std::nullopt;
- auto Existing = VTablePtrAuthInfos.find(Record);
- std::optional<PointerAuthQualifier> Authentication;
- if (Existing != VTablePtrAuthInfos.end()) {
- Authentication = Existing->getSecond();
- } else {
- Authentication = computeVTPointerAuthentication(Record);
- VTablePtrAuthInfos.insert(std::make_pair(Record, Authentication));
+ if (!IsVTTEntry) {
+ auto Existing = VTablePtrAuthInfos.find(Record);
+ if (Existing != VTablePtrAuthInfos.end())
+ return Existing->getSecond();
}
+ std::optional<PointerAuthQualifier> Authentication =
+ computeVTPointerAuthentication(Record, IsVTTEntry);
+ if (!IsVTTEntry)
+ VTablePtrAuthInfos.insert(std::make_pair(Record, Authentication));
return Authentication;
----------------
chbessonova wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/205808
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits