[PATCH] D19500: Parse and dump PDB DBI Stream Header Information

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 15:17:31 PDT 2016


zturner added inline comments.

================
Comment at: lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp:86-87
@@ +85,4 @@
+
+  if (Header->VersionSignature != -1)
+    return std::make_error_code(std::errc::illegal_byte_sequence);
+
----------------
majnemer wrote:
> All signatures != -1 are ok?
That's what Microsoft's dumper does, so I assume it's ok.

================
Comment at: lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp:114
@@ +113,3 @@
+bool PDBDbiStream::isIncrementallyLinked() const {
+  return !!((Header->Flags & FLAG_INCREMENTAL_MASK) >> FLAG_INCREMENTAL_SHIFT);
+}
----------------
majnemer wrote:
> This is a little confusing to read, why not just write `return (Header->Flags & FLAG_INCREMENTAL_MASK) != 0;`
I mostly did it this way so that the code for converting to bool and non-bool looked the same, but I can change it.


http://reviews.llvm.org/D19500





More information about the llvm-commits mailing list