DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags with...
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Mar 2015 17:44:49 +0000 (17:44 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Mar 2015 17:44:49 +0000 (17:44 +0000)
commitc33c447af94922d68fd25fe666a077c3a56b2102
treecae95785e9579c1118ceb42f00f57a5b9fa6d92e
parente53dbeb2addf8e19cad61227d29e117392e00994
DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags with empty file names.

Some languages, such as Go, have pre-defined structure types (e.g. "string"
is essentially a pointer/length pair) or pre-defined "typedef" types
(e.g. "error" is essentially a typedef for a specific interface type).
Such types do not have associated source location, so a Go frontend would
be correct not to associate a file name with such types.

This change relaxes the DIType verifier to permit unlocated types with
these tags.

Differential Revision: http://reviews.llvm.org/D8588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233200 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DebugInfo.cpp
test/DebugInfo/X86/missing-file-line.ll [new file with mode: 0644]