[PATCH] D65914: [Dwarf] DW_TAG_unspecified_type is a type tag.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 16:00:03 PDT 2019


JDevlieghere updated this revision to Diff 214731.
JDevlieghere added a comment.
Herald added a subscriber: jfb.

Add missing type tags and sort the list alphabetically.


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

https://reviews.llvm.org/D65914

Files:
  llvm/include/llvm/BinaryFormat/Dwarf.h
  llvm/test/DebugInfo/X86/template.ll


Index: llvm/test/DebugInfo/X86/template.ll
===================================================================
--- llvm/test/DebugInfo/X86/template.ll
+++ llvm/test/DebugInfo/X86/template.ll
@@ -1,6 +1,7 @@
 ; REQUIRES: object-emission
 
 ; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s
+; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | not llvm-dwarfdump -verify - | FileCheck %s --check-prefix VERIFY
 
 ; IR generated with `clang++ -g -emit-llvm -S` from the following code:
 ; template<int x, int*, template<typename> class y, decltype(nullptr) n, int ...z>  int func() {
@@ -11,6 +12,9 @@
 ; int glbl = func<3, &glbl, y_impl, nullptr, 1, 2>();
 ; y_impl<int>::nested n;
 
+; VERIFY-NOT: error: DIE has DW_AT_type with incompatible tag DW_TAG_unspecified_type
+; VERIFY: error: DIEs have overlapping address ranges
+
 ; CHECK: [[INT:0x[0-9a-f]*]]:{{ *}}DW_TAG_base_type
 ; CHECK-NEXT: DW_AT_name{{.*}} = "int"
 
Index: llvm/include/llvm/BinaryFormat/Dwarf.h
===================================================================
--- llvm/include/llvm/BinaryFormat/Dwarf.h
+++ llvm/include/llvm/BinaryFormat/Dwarf.h
@@ -90,25 +90,33 @@
 inline bool isType(Tag T) {
   switch (T) {
   case DW_TAG_array_type:
+  case DW_TAG_atomic_type:
+  case DW_TAG_base_type:
   case DW_TAG_class_type:
-  case DW_TAG_interface_type:
+  case DW_TAG_coarray_type:
+  case DW_TAG_const_type:
+  case DW_TAG_dynamic_type:
   case DW_TAG_enumeration_type:
+  case DW_TAG_file_type:
+  case DW_TAG_immutable_type:
+  case DW_TAG_interface_type:
+  case DW_TAG_packed_type:
   case DW_TAG_pointer_type:
+  case DW_TAG_ptr_to_member_type:
   case DW_TAG_reference_type:
+  case DW_TAG_restrict_type:
   case DW_TAG_rvalue_reference_type:
+  case DW_TAG_set_type:
+  case DW_TAG_shared_type:
   case DW_TAG_string_type:
   case DW_TAG_structure_type:
+  case DW_TAG_subrange_type:
   case DW_TAG_subroutine_type:
+  case DW_TAG_thrown_type:
+  case DW_TAG_typedef:
   case DW_TAG_union_type:
-  case DW_TAG_ptr_to_member_type:
-  case DW_TAG_set_type:
-  case DW_TAG_subrange_type:
-  case DW_TAG_base_type:
-  case DW_TAG_const_type:
-  case DW_TAG_file_type:
-  case DW_TAG_packed_type:
+  case DW_TAG_unspecified_type:
   case DW_TAG_volatile_type:
-  case DW_TAG_typedef:
     return true;
   default:
     return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65914.214731.patch
Type: text/x-patch
Size: 2369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190812/aa6a08c6/attachment.bin>


More information about the llvm-commits mailing list