[PATCH] D94391: CGDebugInfo: Drop Loc.isInvalid() special case from getLineNumber

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 12 15:09:53 PST 2021


dblaikie added a comment.

In D94391#2494316 <https://reviews.llvm.org/D94391#2494316>, @MaskRay wrote:

> I removed `CurLoc` from call sites and tried a stage 2 build. There is such a difference:
>
>   0x00062228:   DW_TAG_structure_type
>                   DW_AT_calling_convention        (DW_CC_pass_by_value)
>                   DW_AT_name      ("__va_list_tag")
>                   DW_AT_byte_size (0x18)
>                   DW_AT_decl_file ("/home/maskray/llvm/clang/tools/driver/driver.cpp")
>                   DW_AT_decl_line (23)
>
> driver.cpp:23 is a `#include`. So this looks strange. The DW_AT_decl_file/DW_AT_decl_line attributes are undesired due to `CurLoc` getLineNumber.

I don't understand what you're describing - could you describe it in more detail/help me connect the dots?

It sounds like you're saying you removed the CurLoc fallback and then did a stage 2 build of clang and found an example of worse debug info (I'm not sure what file/line this struct was attributed to currently/without the change you were experimenting with) - that would suggest to me that the CurLoc fallback is helping, by providing a better location than the one you've mentioned here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94391/new/

https://reviews.llvm.org/D94391



More information about the cfe-commits mailing list