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

ykhatav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 07:46:21 PDT 2023


ykhatav added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:68
 
+extern cl::opt<DefaultOnOff> UnknownLocations;
+
----------------
dblaikie wrote:
> 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.
Sorry, I misunderstood what you said.. I was able to move "UnknownLocations" to LexicalScope.h 


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

https://reviews.llvm.org/D144337



More information about the llvm-commits mailing list