Index: llvm/include/llvm/BinaryFormat/Dwarf.h =================================================================== --- llvm/include/llvm/BinaryFormat/Dwarf.h +++ llvm/include/llvm/BinaryFormat/Dwarf.h @@ -108,6 +108,7 @@ case DW_TAG_file_type: case DW_TAG_packed_type: case DW_TAG_volatile_type: + case DW_TAG_unspecified_type: case DW_TAG_typedef: return true; default: 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 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::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"