[all-commits] [llvm/llvm-project] 9d117e: Define __GCC_HAVE_DWARF2_CFI_ASM if applicable
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Mar 9 22:21:53 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9d117e7b2a399a9b2bcf53fb9b9c0946e82dc75c
https://github.com/llvm/llvm-project/commit/9d117e7b2a399a9b2bcf53fb9b9c0946e82dc75c
Author: Fangrui Song <i at maskray.me>
Date: 2021-03-09 (Tue, 09 Mar 2021)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
A clang/test/Preprocessor/unwind-tables.c
Log Message:
-----------
Define __GCC_HAVE_DWARF2_CFI_ASM if applicable
In -fno-exceptions -fno-asynchronous-unwind-tables -g0 mode,
GCC does not emit `.cfi_*` directives.
```
% diff <(gcc -fno-asynchronous-unwind-tables -dM -E a.c) <(gcc -dM -E a.c)
130a131
> #define __GCC_HAVE_DWARF2_CFI_ASM 1
```
This macro is useful because code can decide whether inline asm should include `.cfi_*` directives.
`.cfi_*` directives without `.cfi_startproc` can cause assembler errors
(integrated assembler: `this directive must appear between .cfi_startproc and .cfi_endproc directives`).
Differential Revision: https://reviews.llvm.org/D97743
More information about the All-commits
mailing list