dblaikie added a comment.

Side note: The src_file is not to be trusted/used either - once line 0 is 
specified, nothing else in that line entry is valid. LLVM lets the previous 
line entries file persist because this reduces encoding size (by not having to 
switch all the fields in the line table - only the line number - back and forth 
over a line number 0 area). eg: previous entry in the line table might be from 
a #include of some code (as in clang/llvm's use of .def files, for instance) 
into a function, or from some inlining above the line 0 region, etc.

So maybe "artificial location in function <X>" might be suitable? (the actual 
code at line 0 might still be from some inlining (LLVM does try to scope it - 
so the instruction should have the nearest common scope (in terms of lexical 
scopes or inlined functions) so if A has B inlined, B has C and D inlined into 
it and some code is commoned between C and D, it should be attributed to the 
inlined region of B - but if it's hoisted out of a basic block, I don't think 
we can properly attribute it to any scope, and so we'd have to attribute it to 
A in the scope DIE information (in all these cases it'd still have line 0, 
though).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115313

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

Reply via email to