llvm/clang/test/Preprocessor/unwind-tables.c
Fangrui Song 7647a8413b Fix -fno-unwind-tables -fasynchronous-unwind-tables to emit unwind tables
This matches GCC.

Change the CC1 option to encode the unwind table level (1: needed by exceptions,
2: asynchronous) so that we can support two modes in the future.
2021-09-23 16:15:40 -07:00

12 lines
699 B
C

// RUN: %clang %s -dM -E -target x86_64-windows | FileCheck %s --check-prefix=NO
// RUN: %clang %s -dM -E -target x86_64 -fno-asynchronous-unwind-tables | FileCheck %s --check-prefix=NO
// RUN: %clang %s -dM -E -target x86_64 | FileCheck %s
// RUN: %clang %s -dM -E -target x86_64 -funwind-tables -fno-asynchronous-unwind-tables -g | FileCheck %s
// RUN: %clang %s -dM -E -target aarch64-apple-darwin | FileCheck %s
// RUN: %clang %s -dM -E -target x86_64 -fno-asynchronous-unwind-tables -g | FileCheck %s
// RUN: %clang %s -dM -E -target x86_64 -fno-asynchronous-unwind-tables -fexceptions | FileCheck %s
// NO-NOT: #define __GCC_HAVE_DWARF2_CFI_ASM
// CHECK: #define __GCC_HAVE_DWARF2_CFI_ASM 1