xref: /llvm-project/llvm/test/Instrumentation/SanitizerCoverage/abort-in-entry-block.ll (revision 86d1a0b30684f2ab8ec33f0b6fa3d05e4bada0c8)
1a2759327SKostya Serebryany; Checks that a function with no-return in the entry block is not instrumented.
2*eca01b03SLeonard Chan; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s
3a2759327SKostya Serebryany; CHECK-NOT: call void @__sanitizer_cov_trace_pc_guard
4a2759327SKostya Serebryany
5a2759327SKostya Serebryanytarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6a2759327SKostya Serebryanytarget triple = "x86_64-unknown-linux-gnu"
7a2759327SKostya Serebryany
8a2759327SKostya Serebryanydefine dso_local void @_Z3foov() noinline nounwind optnone uwtable {
9a2759327SKostya Serebryanyentry:
10a2759327SKostya Serebryany  call void @abort() noreturn nounwind
11a2759327SKostya Serebryany  unreachable
12a2759327SKostya Serebryany
13a2759327SKostya Serebryanyreturn:                                           ; No predecessors!
14a2759327SKostya Serebryany  ret void
15a2759327SKostya Serebryany}
16a2759327SKostya Serebryany
17a2759327SKostya Serebryanydeclare dso_local void @abort() noreturn nounwind
18