22 lines · plain
1; Test that the coverage guards have proper comdat2; Make sure asan does not instrument __sancov_gen_3 4; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s5; RUN: opt < %s -passes='module(sancov-module,asan)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"7target triple = "x86_64-unknown-linux-gnu"8$Foo = comdat any9; Function Attrs: uwtable10define linkonce_odr void @Foo() comdat {11entry:12 ret void13}14 15define linkonce_odr void @Bar() {16entry:17 ret void18}19 20; CHECK: @__sancov_gen_ = private global [1 x i32] zeroinitializer, section "__sancov_guards", comdat($Foo)21; CHECK: @__sancov_gen_.1 = private global [1 x i32] zeroinitializer, section "__sancov_guards"22