forked from OSchip/llvm-project
[ASan] Allow disabling init-order checks for globals by source file name.
llvm-svn: 179280
This commit is contained in:
parent
b5739daf2d
commit
a28f36c2e2
|
|
@ -20,6 +20,7 @@
|
||||||
// global-init:*global_with_initialization_issues*
|
// global-init:*global_with_initialization_issues*
|
||||||
// global-init-type:*Namespace::ClassName*
|
// global-init-type:*Namespace::ClassName*
|
||||||
// src:file_with_tricky_code.cc
|
// src:file_with_tricky_code.cc
|
||||||
|
// global-init-src:ignore-global-initializers-issues.cc
|
||||||
// ---
|
// ---
|
||||||
// Note that the wild card is in fact an llvm::Regex, but * is automatically
|
// Note that the wild card is in fact an llvm::Regex, but * is automatically
|
||||||
// replaced with .*
|
// replaced with .*
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,8 @@ static StringRef GetGVTypeString(const GlobalVariable &G) {
|
||||||
bool BlackList::isInInit(const GlobalVariable &G) const {
|
bool BlackList::isInInit(const GlobalVariable &G) const {
|
||||||
return (isIn(*G.getParent()) ||
|
return (isIn(*G.getParent()) ||
|
||||||
inSection("global-init", G.getName()) ||
|
inSection("global-init", G.getName()) ||
|
||||||
inSection("global-init-type", GetGVTypeString(G)));
|
inSection("global-init-type", GetGVTypeString(G)) ||
|
||||||
|
inSection("global-init-src", G.getParent()->getModuleIdentifier()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BlackList::inSection(const StringRef Section,
|
bool BlackList::inSection(const StringRef Section,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue