[PATCH] DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags with empty file names.
David Blaikie
dblaikie at gmail.com
Tue Mar 24 13:45:42 PDT 2015
Some IR test cases might be nice to have here, to avoid regressing this
functionality.
On Tue, Mar 24, 2015 at 1:42 PM, Peter Collingbourne <peter at pcc.me.uk>
wrote:
> Hi dexonsmith,
>
> 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.
>
> http://reviews.llvm.org/D8588
>
> Files:
> lib/IR/DebugInfo.cpp
>
> Index: lib/IR/DebugInfo.cpp
> ===================================================================
> --- lib/IR/DebugInfo.cpp
> +++ lib/IR/DebugInfo.cpp
> @@ -283,7 +283,9 @@
> 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;
> }
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150324/8f1669af/attachment.html>
More information about the llvm-commits
mailing list