1 ;; Test that we set patchable-function-prefix for asan.module_ctor when kcfi-offset is defined.
3 ; RUN: opt < %s -passes=asan -S | FileCheck %s
5 ; CHECK: @llvm.global_ctors = {{.*}}{ i32 1, ptr @asan.module_ctor, ptr @asan.module_ctor }
7 ; CHECK: define internal void @asan.module_ctor()
8 ; CHECK-SAME: #[[#ATTR:]]
9 ; CHECK-SAME: !kcfi_type
11 ; CHECK: attributes #[[#ATTR]] = { {{.*}} "patchable-function-prefix"="3" }
13 !llvm.module.flags = !{!0, !1}
14 !0 = !{i32 4, !"kcfi", i32 1}
15 !1 = !{i32 4, !"kcfi-offset", i32 3}