[PATCH] D125784: [llvm-debuginfo-analyzer] 09 - CodeView Reader

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 05:20:07 PDT 2022


CarlosAlbertoEnciso added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewReader.h:154
+
+  Error collectInlineeInfo(DebugInlineeLinesSubsectionRef &Lines,
+                           const llvm::pdb::SymbolGroup *SG = nullptr);
----------------
psamolysov wrote:
> I'm not sure, but the `DebugInlineeLinesSubsectionRef` type has the suffix `Ref`. Does it mean the same intent that the `StringRef` class, for example, has: lightweight objects of the class should be passed by value? 
Looking at other occurrences of `DebugInlineeLinesSubsectionRef` in the LLVM tree, I can see that always is passed by reference. See `llvm-pdbutil`, `llvm-readobj`.


================
Comment at: llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp:228
+                                          StringRef &Name) {
+  assert(SectionContents.data() < RelocPtr &&
+         RelocPtr < SectionContents.data() + SectionContents.size() &&
----------------
CarlosAlbertoEnciso wrote:
> psamolysov wrote:
> > What if `RelocPtr` is exactly equal to `SectionContents.data()`?
> The assertion should be `assert(SectionContents.data() <= RelocPtr && ...`.
Looking with more detail, the function `resolveSymbolName` is not used.
Removed the dead code.


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

https://reviews.llvm.org/D125784



More information about the llvm-commits mailing list