Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / asan-frame-pointer.cpp
blobed3624f3146ebb2834baa065d73d6a0a3f65cf53
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=NONE
4 // RUN: %clang_cc1 -emit-llvm -fsanitize=address -mframe-pointer=non-leaf %s -o - | FileCheck %s --check-prefix=NONLEAF
5 // RUN: %clang_cc1 -emit-llvm -fsanitize=address -mframe-pointer=all %s -o - | FileCheck %s --check-prefix=ALL
7 int global;
9 // NONE: define internal void @asan.module_ctor() #[[#ATTR:]] {
10 // NONE: define internal void @asan.module_dtor() #[[#ATTR]] {
11 // NONE: attributes #[[#ATTR]] = { nounwind }
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" }
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" }