[PATCH] Emit void type as unspecified type with name "void"

David Blaikie dblaikie at gmail.com
Fri Mar 22 14:52:02 PDT 2013


Looks mostly reasonable:

* if it has to be named "void" why does "createVoidType" take a string?
* why do you need the if void/DIType else/getOrCreateType? Why does
the void type not fall out of getOrCreateType like any other type?
* you could underconstrain your Clang test case a bit further -
probably drop the "null, null, metadata !"" from the second CHECK, I'm
not sure it adds much (you don't really need to check that the first
operand is i32 either: [[VOIDPTR]] = {{.*}}, metadata
![[VOID:[0-9]+]]} ; [ DW_TAG_pointer_type ]), remove the metadata
checking in the 3rd line & just rely on the annotation comment (this
makes the test cases more resilient to changes in the metadata format
- it's easier for us to preserve the annotation comment correctness
(at least that's been my feeling recently with all the schema changes
I've been making), similarly with the CONSVOIDPTR line and CONST line
* If you're updating the C++0x nullptr line anyway, perhaps you could
s/C++0x/C++11/ while you're there (you could commit these nullptr
changes separately if you like, so patches are more clear/specific)
* in DIBuilder.cpp would it be possible to quote the DWARF spec,
rather than paraphrasing it? (see otehr examples of standards
quotations in the codebase (there are many examples of C++11
quotations in the Clang codebase)

Thanks,

On Fri, Mar 22, 2013 at 2:33 PM, Adrian Prantl <aprantl at apple.com> wrote:
> According to section 5.2 of the DWARF4 standard, the void type
> should be represented as an unspecified type with the name "void”.
> (Before this we would emit an empty type and let the debugger guess the name).
>
> Fix for rdar://problem/13291085
>
> thanks,
> Adrian
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the llvm-commits mailing list