[PATCH] Separate file parsing from File's constructors.

Michael Spencer bigcheesegs at gmail.com
Thu Dec 11 19:11:54 PST 2014


lgtm other than the error semantics.


================
Comment at: lib/ReaderWriter/ELF/DynamicFile.h:58-61
@@ -57,1 +57,6 @@
 
+  std::error_code parse() override {
+    if (_parsed)
+      return std::error_code();
+    _parsed = true;
+    std::error_code ec;
----------------
The error semantics here are a bit weird. All calls to parse() will not error after the first, even if the first errors out.

http://reviews.llvm.org/D6633

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list