aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-04-11 13:20:00 +0000
committerAlexey Samsonov <samsonov@google.com>2013-04-11 13:20:00 +0000
commit305e3b277c5e721431e60808293a9228c62e319e (patch)
tree64372933e62c72a126d41f510923ff0b3aecf59f /lib
parent34e3051f8cef9c905294da689ce8315196b4de7d (diff)
downloadexternal_llvm-305e3b277c5e721431e60808293a9228c62e319e.zip
external_llvm-305e3b277c5e721431e60808293a9228c62e319e.tar.gz
external_llvm-305e3b277c5e721431e60808293a9228c62e319e.tar.bz2
[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
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Instrumentation/BlackList.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/BlackList.cpp b/lib/Transforms/Instrumentation/BlackList.cpp
index 927982d..39de4b0 100644
--- a/lib/Transforms/Instrumentation/BlackList.cpp
+++ b/lib/Transforms/Instrumentation/BlackList.cpp
@@ -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,