[PATCH] D19343: Move PDB parsing code into a library

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 14:33:57 PDT 2016


deadalnix added a subscriber: deadalnix.
deadalnix added a comment.

Please make sure you do not introduce a bunch of warnings.


================
Comment at: lib/DebugInfo/PDB/PDB.cpp:33
@@ -28,4 +32,3 @@
 #endif
-  return PDB_ErrorCode::NoDiaSupport;
 }
 
----------------
  control may reach end of non-void function

================
Comment at: lib/DebugInfo/PDB/PDB.cpp:44
@@ -37,3 +43,2 @@
 #endif
-  return PDB_ErrorCode::NoDiaSupport;
 }
----------------
dito

================
Comment at: lib/DebugInfo/PDB/Raw/PDBFile.cpp:19
@@ +18,3 @@
+namespace {
+static const char Magic[] = {'M',  'i',  'c',    'r', 'o', 's',  'o',  'f',
+                             't',  ' ',  'C',    '/', 'C', '+',  '+',  ' ',
----------------
  warning: variable 'Magic' is not needed and will not be emitted

================
Comment at: lib/DebugInfo/PDB/Raw/PDBFile.cpp:189
@@ +188,3 @@
+                     SB->BlockSize / sizeof(support::ulittle32_t));
+    if (EC = checkOffset(M, DirectoryBlock))
+      return EC;
----------------
dito

================
Comment at: lib/DebugInfo/PDB/Raw/RawSession.cpp:35
@@ +34,3 @@
+  std::error_code EC;
+  if (EC = ErrorOrBuffer.getError())
+    return PDB_ErrorCode::CouldNotCreateImpl;
----------------
This warns

================
Comment at: lib/DebugInfo/PDB/Raw/RawSession.cpp:41
@@ +40,3 @@
+  std::unique_ptr<PDBFile> File(new PDBFile(std::move(Buffer)));
+  if (EC = File->ParseFileHeaders())
+    return PDB_ErrorCode::InvalidFileFormat;
----------------
dito

================
Comment at: lib/DebugInfo/PDB/Raw/RawSession.cpp:43
@@ +42,3 @@
+    return PDB_ErrorCode::InvalidFileFormat;
+  if (EC = File->ParseStreamData())
+    return PDB_ErrorCode::InvalidFileFormat;
----------------
dito


http://reviews.llvm.org/D19343





More information about the llvm-commits mailing list