[clang] c965e14 - Revert "[DebugInfo] Fix the mismatching between C++ language tags and Dwarf versions."

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 13 21:29:40 PDT 2021


Please include some details about why a patch is being reverted in the
patch description - helps with history & triage (if someone's seeing a
local failure they'll have an idea whether this patch will address
their issue, if someone wants to do the same kind of work in the
future they'd know the pitfalls to avoid)

On Mon, Apr 12, 2021 at 3:37 AM via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
>
> Author: Esme-Yi
> Date: 2021-04-12T10:36:46Z
> New Revision: c965e14a12955355ead9ea093989a8fcbf03a8c1
>
> URL: https://github.com/llvm/llvm-project/commit/c965e14a12955355ead9ea093989a8fcbf03a8c1
> DIFF: https://github.com/llvm/llvm-project/commit/c965e14a12955355ead9ea093989a8fcbf03a8c1.diff
>
> LOG: Revert "[DebugInfo] Fix the mismatching between C++ language tags and Dwarf versions."
>
> This reverts commit 62fa9b9388aa114e3b1a58bbdbcd966ae3492ba5.
>
> Added:
>
>
> Modified:
>     clang/lib/CodeGen/CGDebugInfo.cpp
>     clang/test/Modules/ModuleDebugInfo.cpp
>
> Removed:
>     clang/test/CodeGenCXX/debug-info-programming-language.cpp
>
>
> ################################################################################
> diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
> index 290cdbf8c4e34..d20b309b476de 100644
> --- a/clang/lib/CodeGen/CGDebugInfo.cpp
> +++ b/clang/lib/CodeGen/CGDebugInfo.cpp
> @@ -568,9 +568,9 @@ void CGDebugInfo::CreateCompileUnit() {
>    if (LO.CPlusPlus) {
>      if (LO.ObjC)
>        LangTag = llvm::dwarf::DW_LANG_ObjC_plus_plus;
> -    else if (LO.CPlusPlus14 && CGM.getCodeGenOpts().DwarfVersion >= 5)
> +    else if (LO.CPlusPlus14)
>        LangTag = llvm::dwarf::DW_LANG_C_plus_plus_14;
> -    else if (LO.CPlusPlus11 && CGM.getCodeGenOpts().DwarfVersion >= 5)
> +    else if (LO.CPlusPlus11)
>        LangTag = llvm::dwarf::DW_LANG_C_plus_plus_11;
>      else
>        LangTag = llvm::dwarf::DW_LANG_C_plus_plus;
>
> diff  --git a/clang/test/CodeGenCXX/debug-info-programming-language.cpp b/clang/test/CodeGenCXX/debug-info-programming-language.cpp
> deleted file mode 100644
> index 82a6db6445f36..0000000000000
> --- a/clang/test/CodeGenCXX/debug-info-programming-language.cpp
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -// RUN: %clang_cc1 -dwarf-version=5  -emit-llvm -triple %itanium_abi_triple %s -o - \
> -// RUN:   -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited \
> -// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s
> -// RUN: %clang_cc1 -dwarf-version=3  -emit-llvm -triple %itanium_abi_triple %s -o - \
> -// RUN:   -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited \
> -// RUN: | FileCheck --check-prefix=CHECK-DWARF3 %s
> -
> -int main() {
> -  return 0;
> -}
> -
> -// CHECK-DWARF5: distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14,
> -// CHECK-DWARF3: distinct !DICompileUnit(language: DW_LANG_C_plus_plus,
>
> diff  --git a/clang/test/Modules/ModuleDebugInfo.cpp b/clang/test/Modules/ModuleDebugInfo.cpp
> index 836f0d28fb2a2..3121719e55a66 100644
> --- a/clang/test/Modules/ModuleDebugInfo.cpp
> +++ b/clang/test/Modules/ModuleDebugInfo.cpp
> @@ -23,7 +23,7 @@
>  // CHECK-MOD: distinct !DICompileUnit(language: DW_LANG_{{.*}}C_plus_plus,
>
>  // CHECK: distinct !DICompileUnit(language: DW_LANG_{{.*}}C_plus_plus,
> -// CHECK-CXX: distinct !DICompileUnit(language: DW_LANG_C_plus_plus,
> +// CHECK-CXX: distinct !DICompileUnit(language: DW_LANG_C_plus_plus_11,
>  // CHECK-SAME:                    isOptimized: false,
>  // CHECK-NOT:                     splitDebugFilename:
>  // CHECK-SAME:                    dwoId:
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list