Author: Fangrui Song Date: 2021-03-09T12:14:12-08:00 New Revision: b4948c27d2e40586c0c4fa7cbf20b9c40a9f7584
URL: https://github.com/llvm/llvm-project/commit/b4948c27d2e40586c0c4fa7cbf20b9c40a9f7584 DIFF: https://github.com/llvm/llvm-project/commit/b4948c27d2e40586c0c4fa7cbf20b9c40a9f7584.diff LOG: Revert D97743 "Define __GCC_HAVE_DWARF2_CFI_ASM if applicable" This reverts commit c11ff4bbada3b5127a1f010e0a97a1e6e46fb61a & df67d3526962ae51446b1390e7c40e045e580ec2. Trying to make the change to the driver to avoid round-trip issues. Added: Modified: clang/lib/Frontend/CompilerInvocation.cpp clang/test/CodeGen/debug-info-macro.c Removed: clang/test/Preprocessor/unwind-tables.c ################################################################################ diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index bd0240870706..2606e9f1b185 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4355,11 +4355,6 @@ bool CompilerInvocation::CreateFromArgsImpl( Res.getCodeGenOpts().Argv0 = Argv0; Res.getCodeGenOpts().CommandLineArgs = CommandLineArgs; - if ((T.isOSBinFormatELF() || T.isOSBinFormatMachO()) && - (Res.getLangOpts()->Exceptions || Res.getCodeGenOpts().UnwindTables || - Res.getCodeGenOpts().getDebugInfo() != codegenoptions::NoDebugInfo)) - Res.getPreprocessorOpts().addMacroDef("__GCC_HAVE_DWARF2_CFI_ASM=1"); - Success &= FixupInvocation(Res, Diags, Args, DashX); return Success; diff --git a/clang/test/CodeGen/debug-info-macro.c b/clang/test/CodeGen/debug-info-macro.c index 22080df2c6de..6294d43753f0 100644 --- a/clang/test/CodeGen/debug-info-macro.c +++ b/clang/test/CodeGen/debug-info-macro.c @@ -27,7 +27,7 @@ // CHECK: !DICompileUnit({{.*}} macros: [[Macros:![0-9]+]] // CHECK: [[EmptyMD:![0-9]+]] = !{} -// NO_PCH: [[Macros]] = !{[[MainMacroFile:![0-9]+]], [[BuiltinMacro:![0-9]+]], {{.*}}, [[DefineC1:![0-9]+]], [[DefineA:![0-9]+]], [[UndefC1:![0-9]+]], ![[#]]} +// NO_PCH: [[Macros]] = !{[[MainMacroFile:![0-9]+]], [[BuiltinMacro:![0-9]+]], {{.*}}, [[DefineC1:![0-9]+]], [[DefineA:![0-9]+]], [[UndefC1:![0-9]+]]} // PCH: [[Macros]] = !{[[MainMacroFile:![0-9]+]], [[DefineC1:![0-9]+]], [[DefineA:![0-9]+]], [[UndefC1:![0-9]+]]} // CHECK: [[MainMacroFile]] = !DIMacroFile(file: [[MainFile:![0-9]+]], nodes: [[N1:![0-9]+]]) diff --git a/clang/test/Preprocessor/unwind-tables.c b/clang/test/Preprocessor/unwind-tables.c deleted file mode 100644 index 2f769761b6c6..000000000000 --- a/clang/test/Preprocessor/unwind-tables.c +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: %clang_cc1 %s -verify -munwind-tables -triple x86_64-windows -// RUN: %clang_cc1 %s -verify -triple x86_64-unknown-elf - -// RUN: %clang_cc1 %s -verify -munwind-tables -DCFI_ASM -triple x86_64-unknown-elf -// RUN: %clang_cc1 %s -verify -munwind-tables -DCFI_ASM -triple aarch64-apple-darwin -// RUN: %clang_cc1 %s -verify -debug-info-kind=line-tables-only -DCFI_ASM -triple x86_64-unknown-elf -// RUN: %clang_cc1 %s -verify -fexceptions -DCFI_ASM -triple x86_64-unknown-elf - -// expected-no-diagnostics - -#ifdef CFI_ASM - #if __GCC_HAVE_DWARF2_CFI_ASM != 1 - #error "__GCC_HAVE_DWARF2_CFI_ASM not defined" - #endif -#else - #ifdef __GCC_HAVE_DWARF2_CFI_ASM - #error "__GCC_HAVE_DWARF2_CFI_ASM defined" - #endif -#endif _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits