summaryrefslogtreecommitdiffstats
path: root/llvm/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
commita28f36c2e2e23d642d37e030baefa7953b92366c (patch)
tree00008e62b3dfb4e018af0c2a39c88c7afa1945d9 /llvm/lib
parentb5739daf2d3704c6862783c2602a89c66619821e (diff)
downloadbcm5719-llvm-a28f36c2e2e23d642d37e030baefa7953b92366c.tar.gz
bcm5719-llvm-a28f36c2e2e23d642d37e030baefa7953b92366c.zip
[ASan] Allow disabling init-order checks for globals by source file name.
llvm-svn: 179280
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Instrumentation/BlackList.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/BlackList.cpp b/llvm/lib/Transforms/Instrumentation/BlackList.cpp
index 927982d2af4..39de4b0401c 100644
--- a/llvm/lib/Transforms/Instrumentation/BlackList.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud