[llvm] [llvm-exegesis] Remove unused Counter::read method (PR #76651)
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 09:53:05 PST 2024
================
@@ -356,7 +356,11 @@ class SubProcessFunctionExecutorImpl
if (ChildExitCode == 0) {
// The child exited succesfully, read counter values and return
// success
- CounterValues[0] = Counter->read();
+ auto CounterValueOrErr = Counter->readOrError();
+ if (!CounterValueOrErr)
+ return CounterValueOrErr.takeError();
+ CounterValues.swap(*CounterValueOrErr);
----------------
legrosbuffle wrote:
Any reason not to write `CounterValues = *std::move(CounterValueOrErr);` ?
https://github.com/llvm/llvm-project/pull/76651
More information about the llvm-commits
mailing list