20 lines · cpp
1/// -mframe-pointer=none sets the module flag "frame-pointer" (merge behavior: max).2/// asan synthesized ctor/dtor get the "frame-pointer" function attribute if not zero (default).3// RUN: %clang_cc1 -emit-llvm -fsanitize=address -mframe-pointer=none %s -o - | FileCheck %s --check-prefix=NONE4// RUN: %clang_cc1 -emit-llvm -fsanitize=address -mframe-pointer=non-leaf %s -o - | FileCheck %s --check-prefix=NONLEAF5// RUN: %clang_cc1 -emit-llvm -fsanitize=address -mframe-pointer=all %s -o - | FileCheck %s --check-prefix=ALL6 7int global;8 9// NONE: define internal void @asan.module_ctor() #[[#ATTR:]] {10// NONE: define internal void @asan.module_dtor() #[[#ATTR]] {11// NONE: attributes #[[#ATTR]] = { nounwind12 13// NONLEAF: define internal void @asan.module_ctor() #[[#ATTR:]] {14// NONLEAF: define internal void @asan.module_dtor() #[[#ATTR]] {15// NONLEAF: attributes #[[#ATTR]] = { nounwind "frame-pointer"="non-leaf"16 17// ALL: define internal void @asan.module_ctor() #[[#ATTR:]] {18// ALL: define internal void @asan.module_dtor() #[[#ATTR]] {19// ALL: attributes #[[#ATTR]] = { nounwind "frame-pointer"="all"20