34 lines · plain
1;; Verify that the synthetic functions inherit their flags from the corresponding2;; BTE and return address signing module flags.3; RUN: opt < %s -passes=asan -S | FileCheck %s4; REQUIRES: aarch64-registered-target5 6target triple = "aarch64-unknown-linux-gnu"7 8@g = dso_local global i32 0, align 49 10define i32 @test_load() sanitize_address {11entry:12 %tmp = load i32, ptr @g, align 413 ret i32 %tmp14}15 16!llvm.module.flags = !{!0, !1}17 18;; Due to -fasynchronous-unwind-tables.19!0 = !{i32 7, !"uwtable", i32 2}20 21;; Due to -fno-omit-frame-pointer.22!1 = !{i32 7, !"frame-pointer", i32 2}23 24!llvm.module.flags = !{!2, !3, !4}25 26!2 = !{i32 8, !"branch-target-enforcement", i32 1}27!3 = !{i32 8, !"sign-return-address", i32 1}28!4 = !{i32 8, !"sign-return-address-all", i32 0}29 30;; Set the uwtable attribute on ctor/dtor.31; CHECK: define internal void @asan.module_ctor() #[[#ATTR:]]32; CHECK: define internal void @asan.module_dtor() #[[#ATTR]]33; CHECK: attributes #[[#ATTR]] = { nounwind uwtable "branch-target-enforcement" "frame-pointer"="all" "sign-return-address"="non-leaf" "sign-return-address-key"="a_key" }34