[PATCH] D23177: [CodeView] Decouple the type record deserialization from the visitor.
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 14:40:56 PDT 2016
majnemer added a subscriber: majnemer.
================
Comment at: include/llvm/DebugInfo/CodeView/TypeDeserializer.h:89
@@ +88,3 @@
+ CVRecord<TypeLeafKind> CVR;
+ CVR.Length = OldData.size() - Data.size();
+ CVR.Data = OldData.slice(0, CVR.Length);
----------------
Is it possible for OldData.size() to be less than Data.size()? Should we assert or return an error? Or is this literally not possible?
================
Comment at: tools/llvm-readobj/llvm-readobj.cpp:282-285
@@ -282,7 +281,6 @@
-void error(std::error_code EC) {
- if (!EC)
+void error(std::error_code ec) {
+ if (!ec)
return;
-
- reportError(EC.message());
+ reportError(ec.message());
}
----------------
Why make this change?
================
Comment at: tools/llvm-readobj/llvm-readobj.h:26
@@ -25,2 +25,3 @@
LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg);
+ void error(llvm::Error ec);
void error(std::error_code ec);
----------------
This looks like a redeclaration.
https://reviews.llvm.org/D23177
More information about the llvm-commits
mailing list