mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 21:41:43 +00:00
[ASan] Allow disabling init-order checks for globals by source file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34e3051f8c
commit
305e3b277c
@ -20,6 +20,7 @@
|
||||
// global-init:*global_with_initialization_issues*
|
||||
// global-init-type:*Namespace::ClassName*
|
||||
// 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
|
||||
// replaced with .*
|
||||
|
@ -110,7 +110,8 @@ static StringRef GetGVTypeString(const GlobalVariable &G) {
|
||||
bool BlackList::isInInit(const GlobalVariable &G) const {
|
||||
return (isIn(*G.getParent()) ||
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user