HsiangKai added a comment.

In https://reviews.llvm.org/D45045#1189201, @vext01 wrote:

> Hi,
>
> I've been experimenting some more with this patch.
>
> It seems to me that if a label is optimised away, but you've requested it be 
> preserved, then you get a DWARF label with a zero offset. Is that the 
> expected behaviour? Should it be documented?
>
> E.g.:
>
>   < 6><0x000000dc>              DW_TAG_label
>                                   DW_AT_name                  
> __YK_BLK_2_19418_0
>                                   DW_AT_low_pc                0x00000000
>
>
> Thanks!


I expect that even the code is optimized out, the label will point to somewhere 
in the function. If the whole function is optimized out, the label should not 
exist any more. It should not have address zero.

Do you have any test snippet to reproduce the bug? Thanks.


Repository:
  rL LLVM

https://reviews.llvm.org/D45045



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to