Revert [llvm-mca] Return the total number of cycles from method Pipeline::run().
This reverts commits 347767.
llvm-svn: 347775
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index 9858896..8b792be 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -240,9 +240,8 @@
// Returns true on success.
static bool runPipeline(mca::Pipeline &P) {
// Handle pipeline errors here.
- Expected<unsigned> Cycles = P.run();
- if (!Cycles) {
- WithColor::error() << toString(Cycles.takeError());
+ if (auto Err = P.run()) {
+ WithColor::error() << toString(std::move(Err));
return false;
}
return true;