diff options
| author | Kostya Serebryany <kcc@google.com> | 2014-12-17 21:50:04 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2014-12-17 21:50:04 +0000 |
| commit | fea4fb404eb5234742dd30c3ea662b9f72b38931 (patch) | |
| tree | 362fd66e2c63813b7d0875c5e438ef22c3192680 /llvm/lib/Transforms | |
| parent | 78df9d03fad07309dc4125eadb547665cdc6ec36 (diff) | |
| download | bcm5719-llvm-fea4fb404eb5234742dd30c3ea662b9f72b38931.tar.gz bcm5719-llvm-fea4fb404eb5234742dd30c3ea662b9f72b38931.zip | |
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, llvm part
llvm-svn: 224463
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 07223d4df5c..9293362235b 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -171,10 +171,8 @@ bool SanitizerCoverageModule::runOnModule(Module &M) { bool SanitizerCoverageModule::runOnFunction(Function &F) { if (F.empty()) return false; - // For now instrument only functions that will also be asan-instrumented. - if (!F.hasFnAttribute(Attribute::SanitizeAddress) && - !F.hasFnAttribute(Attribute::SanitizeMemory)) - return false; + if (F.getName().find(".module_ctor") != std::string::npos) + return false; // Should not instrument sanitizer init functions. if (CoverageLevel >= 3) SplitAllCriticalEdges(F, this); SmallVector<Instruction*, 8> IndirCalls; |

