[PATCH] D19901: [ProfileData] (llvm) Use Error in InstrProf and Coverage

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 11:32:24 PDT 2016


davidxl added inline comments.

================
Comment at: include/llvm/ProfileData/Coverage/CoverageMapping.h:47
@@ +46,3 @@
+
+  void log(raw_ostream &OS) const override;
+
----------------
no need for this overrider.

================
Comment at: include/llvm/ProfileData/InstrProf.h:259
@@ -263,3 +258,3 @@
 enum class instrprof_error {
-  success = 0,
+  success,
   eof,
----------------
why this change?

================
Comment at: include/llvm/ProfileData/InstrProf.h:288
@@ +287,3 @@
+
+  void log(raw_ostream &OS) const override;
+
----------------
no need for this override -- define in base.

================
Comment at: include/llvm/ProfileData/ProfileCommon.h:41
@@ +40,3 @@
+template <typename ErrT>
+class EnumBasedError : public ErrorInfo<EnumBasedError<ErrT>> {
+public:
----------------
The name seems to general. How about just ProfErrorInfoBase

================
Comment at: lib/ProfileData/Coverage/CoverageMappingReader.cpp:45
@@ +44,3 @@
+                    },
+                    [&](const InstrProfError &IPE) {
+                      handleErrorIfEOF(IPE.get() == instrprof_error::eof);
----------------
Can this ever happen?


http://reviews.llvm.org/D19901





More information about the llvm-commits mailing list