OSDN Git Service

DebugInfo: elide type index entries for synthetic types
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 3 May 2017 21:39:01 +0000 (21:39 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 3 May 2017 21:39:01 +0000 (21:39 +0000)
commit9de71309863df15acebb8fc908af21b44767ce2f
tree1e5f6964f1da338ef2574c315ecc5e05d15b5c1e
parentd7e3981faea7ed045bd0c719733dd4ead8a2c9d8
DebugInfo: elide type index entries for synthetic types

Compiler emitted synthetic types may not have an associated DIFile
(translation unit).  In such a case, when generating CodeView debug type
information, we would attempt to compute an absolute filepath which
would result in a segfault due to a NULL DIFile*.  If there is no source
file associated with the type, elide the type index entry for the type
and record the type information.  This actually results in higher
fidelity debug information than clang/C2 as of this writing.

Resolves PR32668!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302085 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
test/DebugInfo/COFF/synthetic.ll [new file with mode: 0644]