summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-04-28 17:09:37 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-04-28 17:09:37 +0000
commit3afb26688656fbdc37d43fc938d89fe936bb579c (patch)
treee5b515efb2ff87896a2df297607e79d39dea08e6 /clang/lib/CodeGen/CGClass.cpp
parentf730de619f90706e4bb9dccbc109559ba7585207 (diff)
downloadbcm5719-llvm-3afb26688656fbdc37d43fc938d89fe936bb579c.tar.gz
bcm5719-llvm-3afb26688656fbdc37d43fc938d89fe936bb579c.zip
Re-apply r267784, r267824 and r267830.
I have updated the compiler-rt tests. llvm-svn: 267903
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 351dae9d4dd..71b305c773d 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -2489,7 +2489,7 @@ void CodeGenFunction::EmitBitSetCodeForVCall(const CXXRecordDecl *RD,
llvm::Value *VTable,
SourceLocation Loc) {
if (CGM.getCodeGenOpts().WholeProgramVTables &&
- !CGM.IsBitSetBlacklistedRecord(RD)) {
+ CGM.HasHiddenLTOVisibility(RD)) {
llvm::Metadata *MD =
CGM.CreateMetadataIdentifierForType(QualType(RD->getTypeForDecl(), 0));
llvm::Value *BitSetName =
@@ -2565,7 +2565,12 @@ void CodeGenFunction::EmitVTablePtrCheck(const CXXRecordDecl *RD,
llvm::Value *VTable,
CFITypeCheckKind TCK,
SourceLocation Loc) {
- if (CGM.IsBitSetBlacklistedRecord(RD))
+ if (!CGM.getCodeGenOpts().SanitizeCfiCrossDso &&
+ !CGM.HasHiddenLTOVisibility(RD))
+ return;
+
+ std::string TypeName = RD->getQualifiedNameAsString();
+ if (getContext().getSanitizerBlacklist().isBlacklistedType(TypeName))
return;
SanitizerScope SanScope(this);
OpenPOWER on IntegriCloud