diff options
author | Kostya Serebryany <kcc@google.com> | 2012-09-05 07:29:56 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-09-05 07:29:56 +0000 |
commit | 59a4a47a7bea7cc17877c6a3954ad9f8309ff1cb (patch) | |
tree | 4e0afbded7546e5e6526c145d51758c1a50509ae /lib/Transforms/Instrumentation/BlackList.cpp | |
parent | 4e4e6c0d732f34d4a7adbad40d60e7fc055eaed4 (diff) | |
download | llvm-59a4a47a7bea7cc17877c6a3954ad9f8309ff1cb.tar.gz llvm-59a4a47a7bea7cc17877c6a3954ad9f8309ff1cb.tar.bz2 llvm-59a4a47a7bea7cc17877c6a3954ad9f8309ff1cb.tar.xz |
[asan] extend the blacklist functionality to handle global-init. Patch by Reid Watson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/BlackList.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/BlackList.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/BlackList.cpp b/lib/Transforms/Instrumentation/BlackList.cpp index ecfe954dec..2cb119964a 100644 --- a/lib/Transforms/Instrumentation/BlackList.cpp +++ b/lib/Transforms/Instrumentation/BlackList.cpp @@ -89,6 +89,10 @@ bool BlackList::isIn(const Module &M) { return inSection("src", M.getModuleIdentifier()); } +bool BlackList::isInInit(const GlobalVariable &G) { + return isIn(*G.getParent()) || inSection("global-init", G.getName()); +} + bool BlackList::inSection(const StringRef Section, const StringRef Query) { Regex *FunctionRegex = Entries[Section]; |