2016-09-20 08:16:54 +08:00
|
|
|
; Test that the coverage guards have proper comdat
|
2016-11-16 05:12:50 +08:00
|
|
|
; Make sure asan does not instrument __sancov_gen_
|
2019-07-26 04:53:15 +08:00
|
|
|
|
2019-09-05 04:30:29 +08:00
|
|
|
; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s
|
2021-11-04 02:39:38 +08:00
|
|
|
; RUN: opt < %s -passes='module(require<asan-globals-md>,sancov-module,asan-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s
|
2016-09-20 08:16:54 +08:00
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
$Foo = comdat any
|
|
|
|
; Function Attrs: uwtable
|
|
|
|
define linkonce_odr void @Foo() comdat {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-11-16 05:12:50 +08:00
|
|
|
define linkonce_odr void @Bar() {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: @__sancov_gen_ = private global [1 x i32] zeroinitializer, section "__sancov_guards", comdat($Foo)
|
|
|
|
; CHECK: @__sancov_gen_.1 = private global [1 x i32] zeroinitializer, section "__sancov_guards"
|