[ASan/Win] Don't instrument private COMDAT globals until PR20244 is properly fixed
llvm-svn: 212530
This commit is contained in:
parent
3d570b960e
commit
a4212c244a
|
@ -946,6 +946,13 @@ bool AddressSanitizerModule::ShouldInstrumentGlobal(GlobalVariable *G) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't instrument private COMDAT globals on Windows until PR20244 (linkage
|
||||||
|
// of vftables with RTTI) is properly fixed.
|
||||||
|
llvm::Triple TargetTriple(G->getParent()->getTargetTriple());
|
||||||
|
if (G->hasComdat() && G->getLinkage() == GlobalVariable::PrivateLinkage &&
|
||||||
|
TargetTriple.isWindowsMSVCEnvironment())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (G->hasSection()) {
|
if (G->hasSection()) {
|
||||||
StringRef Section(G->getSection());
|
StringRef Section(G->getSection());
|
||||||
// Ignore the globals from the __OBJC section. The ObjC runtime assumes
|
// Ignore the globals from the __OBJC section. The ObjC runtime assumes
|
||||||
|
|
Loading…
Reference in New Issue