| 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 |
| 6 |
|
| 7 |
int global; |
| 8 |
|
| 9 |
// NONE: define internal void @asan.module_ctor() #[[#ATTR:]] { |
| 10 |
// NONE: define internal void @asan.module_dtor() #[[#ATTR]] { |
| 11 |
// NONE: attributes #[[#ATTR]] = { nounwind |
| 12 |
|
| 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" |