Michael137 updated this revision to Diff 482533.
Michael137 added a comment.

- Split clang and llvm changes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139928/new/

https://reviews.llvm.org/D139928

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/test/CodeGenCXX/debug-info-template-parameter.cpp


Index: clang/test/CodeGenCXX/debug-info-template-parameter.cpp
===================================================================
--- clang/test/CodeGenCXX/debug-info-template-parameter.cpp
+++ clang/test/CodeGenCXX/debug-info-template-parameter.cpp
@@ -3,6 +3,7 @@
 
 // RUN: %clang_cc1 -emit-llvm %std_cxx11-14 -dwarf-version=5 -triple x86_64 %s 
-O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s 
--check-prefixes=CHECK,PRE17
 // RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=5 -triple x86_64 %s 
-O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s 
--check-prefixes=CHECK,CXX17
+// RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=4 -triple x86_64 %s 
-O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s 
--check-prefixes=CHECK,CXX17
 
 // CHECK: DILocalVariable(name: "f1", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
 // CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: 
![[F1_TYPE:[0-9]+]]
Index: clang/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- clang/lib/CodeGen/CGDebugInfo.cpp
+++ clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2015,7 +2015,7 @@
     } break;
     case TemplateArgument::Integral: {
       llvm::DIType *TTy = getOrCreateType(TA.getIntegralType(), Unit);
-      if (Args.TList && CGM.getCodeGenOpts().DwarfVersion >= 5)
+      if (Args.TList)
         if (auto *templateType = dyn_cast_or_null<NonTypeTemplateParmDecl>(
                 Args.TList->getParam(i)))
           if (templateType->hasDefaultArgument() &&


Index: clang/test/CodeGenCXX/debug-info-template-parameter.cpp
===================================================================
--- clang/test/CodeGenCXX/debug-info-template-parameter.cpp
+++ clang/test/CodeGenCXX/debug-info-template-parameter.cpp
@@ -3,6 +3,7 @@
 
 // RUN: %clang_cc1 -emit-llvm %std_cxx11-14 -dwarf-version=5 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,PRE17
 // RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=5 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,CXX17
+// RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=4 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,CXX17
 
 // CHECK: DILocalVariable(name: "f1", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
 // CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: ![[F1_TYPE:[0-9]+]]
Index: clang/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- clang/lib/CodeGen/CGDebugInfo.cpp
+++ clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2015,7 +2015,7 @@
     } break;
     case TemplateArgument::Integral: {
       llvm::DIType *TTy = getOrCreateType(TA.getIntegralType(), Unit);
-      if (Args.TList && CGM.getCodeGenOpts().DwarfVersion >= 5)
+      if (Args.TList)
         if (auto *templateType = dyn_cast_or_null<NonTypeTemplateParmDecl>(
                 Args.TList->getParam(i)))
           if (templateType->hasDefaultArgument() &&
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to