xref: /llvm-project/llvm/test/Instrumentation/DataFlowSanitizer/reaches_function.ll (revision 14ce567fa267cce9466354bed1549a83286866b1)
1; RUN: opt < %s -passes=dfsan -dfsan-reaches-function-callbacks=1 -S | FileCheck %s
2target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-pc-linux-gnu"
4
5declare i32 @f()
6
7define void @load(i32) {
8  ; CHECK-LABEL: define void @load.dfsan
9  ; CHECK: call{{.*}}@__dfsan_reaches_function_callback
10  %i = alloca i32
11  store i32 %0, ptr %i
12  ret void
13}
14
15define void @store(ptr) {
16  ; CHECK-LABEL: define void @store.dfsan
17  ; CHECK: call{{.*}}@__dfsan_reaches_function_callback
18  %load = load i32, ptr %0
19  ret void
20}
21
22define void @call() {
23  ; CHECK-LABEL: define void @call.dfsan
24  ; CHECK: call{{.*}}@__dfsan_reaches_function_callback
25  %ret = call i32 @f()
26  ret void
27}
28
29; CHECK-LABEL: @__dfsan_reaches_function_callback(i8 zeroext, ptr, i32, ptr)
30