aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2022-06-15 09:44:43 -0700
committerArthur Eubanks <aeubanks@google.com>2022-06-16 09:38:14 -0700
commita70b39abffb42eb85fd2dd7960ec9dc7ae38510c (patch)
tree9e8dedc24fa27ebd88c49643165986ff10ad6a38 /clang/lib/CodeGen/CGClass.cpp
parent046ebeb60504abfb053c24c1ee5ab6747cfa5a08 (diff)
downloadllvm-a70b39abffb42eb85fd2dd7960ec9dc7ae38510c.zip
llvm-a70b39abffb42eb85fd2dd7960ec9dc7ae38510c.tar.gz
llvm-a70b39abffb42eb85fd2dd7960ec9dc7ae38510c.tar.bz2
[clang] Don't emit type test/assume for virtual classes that should never participate in WPD
Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D127876
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index cb16019..153f299 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -2695,9 +2695,9 @@ void CodeGenFunction::EmitTypeMetadataCodeForVCall(const CXXRecordDecl *RD,
if (SanOpts.has(SanitizerKind::CFIVCall))
EmitVTablePtrCheckForCall(RD, VTable, CodeGenFunction::CFITCK_VCall, Loc);
else if (CGM.getCodeGenOpts().WholeProgramVTables &&
- // Don't insert type test assumes if we are forcing public std
+ // Don't insert type test assumes if we are forcing public
// visibility.
- !CGM.HasLTOVisibilityPublicStd(RD)) {
+ !CGM.AlwaysHasLTOVisibilityPublic(RD)) {
llvm::Metadata *MD =
CGM.CreateMetadataIdentifierForType(QualType(RD->getTypeForDecl(), 0));
llvm::Value *TypeId =