[PATCH] D130196: [llvm-cov] Improve error message by printing the object file name that produces error

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 06:09:43 PDT 2022


thakis added inline comments.


================
Comment at: llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:606
   /// Ignores non-instrumented object files unless all are not instrumented.
-  static Expected<std::unique_ptr<CoverageMapping>>
+  static std::pair<Expected<std::unique_ptr<CoverageMapping>>, StringRef>
   load(ArrayRef<StringRef> ObjectFilenames, StringRef ProfileFilename,
----------------
Is the signature change needed? llvm::createFileError() creates a FileError, which should fit into an Expected. Maybe we just need to call that in the place that creates the error?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130196/new/

https://reviews.llvm.org/D130196



More information about the llvm-commits mailing list