[PATCH] D136702: [llvm-cov] Look up object files using debuginfod.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 15:08:29 PST 2022


mysterymath added inline comments.


================
Comment at: llvm/lib/Debuginfod/Debuginfod.cpp:61
+  if (!Urls) {
+    consumeError(Urls.takeError());
+    return false;
----------------
jhenderson wrote:
> In other parts of the codebase, `consumeError` without any explanation is generally a code smell. A comment explaining why it's appropriate instead of returning the error up the stack would be worthwhile here.
Several of the debuginfod functions return Expected even though they have no possibility of failure, which seems like the root of the smell. I've refactored this call to just return a value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136702



More information about the llvm-commits mailing list