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

Zequan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 10:37:57 PDT 2022


zequanwu 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,
----------------
thakis wrote:
> 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?
Thanks, I didn't know this before. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130196



More information about the llvm-commits mailing list