[LLVMdev] Checking validity of metadata in an .ll file

Devang Patel dpatel at apple.com
Tue Jan 3 09:41:32 PST 2012


On Jan 2, 2012, at 5:42 AM, Seb wrote:

> Hi Devang,
> 
> Thanks for the answer, I eventually found that in  DW_TAG_compile_unit metadata, if field for 'main' compile unit is set to false then no debug info is generated. Can someone explain what is the meaning of this field ?

It is a relic from the days when each include headers where described using its own compile unit. At that time, it was used to identify main source file for the translation unit. It'd be good to clean this up now.

> 
> You wrote:
> 
> "Right now there is no such check. In fact, 'llc' is trained to silently ignore malformed debug information, because 'opt' is not held reliable to maintain debug info. That said, it would be valuable to write such verification pass."
> 
> Does this means that after opt metadata are not reliable at all ?

Yes. For example, it is certainly possible that opt deletes a function. In such cases, the metadata descriptor for the function will have incomplete info. So the dwarf writer should silently ignore such incomplete descriptors.
-
Devang

> 
> Best Regards
> Seb
> 




More information about the llvm-dev mailing list