[llvm] r179280 - [ASan] Allow disabling init-order checks for globals by source file name.
Alexey Samsonov
samsonov at google.com
Thu Apr 11 06:20:01 PDT 2013
Author: samsonov
Date: Thu Apr 11 08:20:00 2013
New Revision: 179280
URL: http://llvm.org/viewvc/llvm-project?rev=179280&view=rev
Log:
[ASan] Allow disabling init-order checks for globals by source file name.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/BlackList.h
llvm/trunk/lib/Transforms/Instrumentation/BlackList.cpp
Modified: llvm/trunk/include/llvm/Transforms/Utils/BlackList.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/BlackList.h?rev=179280&r1=179279&r2=179280&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/BlackList.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/BlackList.h Thu Apr 11 08:20:00 2013
@@ -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 .*
Modified: llvm/trunk/lib/Transforms/Instrumentation/BlackList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/BlackList.cpp?rev=179280&r1=179279&r2=179280&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/BlackList.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/BlackList.cpp Thu Apr 11 08:20:00 2013
@@ -110,7 +110,8 @@ static StringRef GetGVTypeString(const 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,
More information about the llvm-commits
mailing list