[PATCH] D20936: [pdb] Parse module line info
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 17:38:01 PDT 2016
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h:43
@@ +42,3 @@
+ (sizeof(LineNumberEntry) + (HasColumn ? sizeof(ColumnNumberEntry) : 0));
+ uint32_t Size = BlockHeader->BlockSize - sizeof(LineFileBlockHeader);
+ if (LineInfoSize > Size)
----------------
What if BlockSize is smaller than LineFileBlockHeader?
================
Comment at: include/llvm/DebugInfo/CodeView/StreamArray.h:91-96
@@ -81,5 +90,8 @@
}
VarStreamArrayIterator()
: Array(nullptr), ThisLen(0), ThisValue(), IterRef(), HasError(false),
HadError(nullptr) {}
+ explicit VarStreamArrayIterator(const Extractor &E)
+ : Array(nullptr), ThisLen(0), ThisValue(), IterRef(), HasError(false),
+ HadError(nullptr), Extract(E) {}
~VarStreamArrayIterator() {}
----------------
Should we have in-class member initializers for these? Seems like it might be less error prone/more compact.
================
Comment at: include/llvm/DebugInfo/CodeView/StreamArray.h:213
@@ +212,3 @@
+ : Array(Array), Index(ArrayIndex) {
+ if (Array.size() <= Index)
+ Index = uint32_t(-1);
----------------
Should it be an error for Array.size() to be -1?
http://reviews.llvm.org/D20936
More information about the llvm-commits
mailing list