Fix -fno-unwind-tables -fasynchronous-unwind-tables to emit unwind tables
authorFangrui Song <i@maskray.me>
Thu, 23 Sep 2021 23:15:40 +0000 (16:15 -0700)
committerFangrui Song <i@maskray.me>
Thu, 23 Sep 2021 23:15:40 +0000 (16:15 -0700)
commit7647a8413be55568a8a80fae379a872b7359f5b5
treea2a31f2f6be2e72ae455b22fe49b93d73ffb9509
parent4f28a2eb037defa6a8d85a69e1ff56fe85c0a27b
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.
17 files changed:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGen/asan-globals.cpp
clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
clang/test/CodeGenCXX/linetable-eh.cpp
clang/test/CodeGenCXX/thunks-ehspec.cpp
clang/test/CodeGenCXX/thunks.cpp
clang/test/Driver/aarch64-features.c
clang/test/Driver/clang-translation.c
clang/test/Driver/freebsd.c
clang/test/Driver/fuchsia.c
clang/test/Driver/ppc-features.cpp
clang/test/Driver/sanitize_unwind_tables.c
clang/test/Driver/win-macho-unwind.c
clang/test/Driver/windows-exceptions.cpp
clang/test/Preprocessor/unwind-tables.c