[PATCH] D144337: Prevent line 0 instructions from dividing a lexical block into ranges

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 18:14:54 PST 2023


dblaikie added a comment.

Could you describe why this relates to/depends on the "UnknownLocations" flag? I'm not following from the description - we could still describe these locations as being at line zero, while including them in lexical scopes to avoid fragmented ranges, I think?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:68
 
+extern cl::opt<DefaultOnOff> UnknownLocations;
+
----------------
ykhatav wrote:
> dblaikie wrote:
> > We shouldn't introduce declarations of foreign entities into .cpp files like this (there's a risk of the decl/def getting out of date/inconsistent with each other) - there should be some common header to declare this in. Perhaps that means it goes up in LexicalScopes.h?
> Unfortunately, declaring it in LexicalScopes.h does not work due to dependency issue between AsmPrinter and Codegen. 
Could you describe the dependency issue in more detail? I think it's important that we figure out the layering & where things should be declared - not introduce multiple independent declarations of the same entity.


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

https://reviews.llvm.org/D144337



More information about the llvm-commits mailing list