summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2019-07-25 20:53:15 +0000
committerLeonard Chan <leonardchan@google.com>2019-07-25 20:53:15 +0000
commit007f674c6a4e47cf3a290c0e2d5ba96483d0f8dc (patch)
tree0c1a41c709a6ca7d1cdc5d15b142a56bb614227f /llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
parent9294c87282c6cf93ffd522a5b5ff82d9c0d76205 (diff)
downloadbcm5719-llvm-007f674c6a4e47cf3a290c0e2d5ba96483d0f8dc.tar.gz
bcm5719-llvm-007f674c6a4e47cf3a290c0e2d5ba96483d0f8dc.zip
Reland the "[NewPM] Port Sancov" patch from rL365838. No functional
changes were made to the patch since then. -------- [NewPM] Port Sancov This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty. Changes: - Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over functions and ModuleSanitizerCoverage for passing over modules. - ModuleSanitizerCoverage exists for adding 2 module level calls to initialization functions but only if there's a function that was instrumented by sancov. - Added legacy and new PM wrapper classes that own instances of the 2 new classes. - Update llvm tests and add clang tests. llvm-svn: 367053
Diffstat (limited to 'llvm/test/Instrumentation/SanitizerCoverage/coverage.ll')
-rw-r--r--llvm/test/Instrumentation/SanitizerCoverage/coverage.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll b/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
index 7b6b5f00442..1e8c6982753 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
@@ -1,7 +1,9 @@
; RUN: opt < %s -sancov -sanitizer-coverage-level=4 -sanitizer-coverage-trace-pc -S | FileCheck %s --check-prefix=CHECK_TRACE_PC
-
; RUN: opt < %s -sancov -sanitizer-coverage-level=3 -sanitizer-coverage-prune-blocks=1 -S | FileCheck %s --check-prefix=CHECKPRUNE
+; RUN: opt < %s -passes='module(sancov-module),function(sancov-func)' -sanitizer-coverage-level=4 -sanitizer-coverage-trace-pc -S | FileCheck %s --check-prefix=CHECK_TRACE_PC
+; RUN: opt < %s -passes='module(sancov-module),function(sancov-func)' -sanitizer-coverage-level=3 -sanitizer-coverage-prune-blocks=1 -S | FileCheck %s --check-prefix=CHECKPRUNE
+
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
define void @foo(i32* %a) sanitize_address {
OpenPOWER on IntegriCloud