diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-03-25 17:44:49 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-03-25 17:44:49 +0000 |
commit | b736065f782a36f594a4b3ae1ed28f854fab2fc4 (patch) | |
tree | fa1d038dbed0ab2ed2f9a9398cce174eda25fdbf /llvm/lib/IR/DebugInfo.cpp | |
parent | 2f8f019daf0fc3cee5df09988d7a9121bdcbf4c9 (diff) | |
download | bcm5719-llvm-b736065f782a36f594a4b3ae1ed28f854fab2fc4.tar.gz bcm5719-llvm-b736065f782a36f594a4b3ae1ed28f854fab2fc4.zip |
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
llvm-svn: 233200
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index ad0b98e90c0..9a6b9536bc1 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -283,7 +283,9 @@ bool DIType::Verify() const { Tag != dwarf::DW_TAG_restrict_type && Tag != dwarf::DW_TAG_array_type && Tag != dwarf::DW_TAG_enumeration_type && Tag != dwarf::DW_TAG_subroutine_type && - Tag != dwarf::DW_TAG_inheritance && Tag != dwarf::DW_TAG_friend) + Tag != dwarf::DW_TAG_inheritance && Tag != dwarf::DW_TAG_friend && + Tag != dwarf::DW_TAG_structure_type && Tag != dwarf::DW_TAG_member && + Tag != dwarf::DW_TAG_typedef) return false; } |