Remove PassResult and have the runOnFunction/runOnModule functions return void instead. To signal a pass failure, passes should now invoke the 'signalPassFailure' method. This provides the equivalent functionality when needed, but isn't an intrusive part of the API like PassResult.

PiperOrigin-RevId: 236202029
This commit is contained in:
River Riddle
2019-02-28 14:50:42 -08:00
committed by jpienaar
parent 58889884a2
commit ed5fe2098b
28 changed files with 135 additions and 151 deletions

View File

@@ -284,7 +284,7 @@ Expected<std::unique_ptr<ExecutionEngine>> ExecutionEngine::create(
// Construct and run the default MLIR pipeline.
PassManager manager;
getDefaultPasses(manager, {});
if (manager.run(m))
if (!manager.run(m))
return make_string_error("passes failed");
auto llvmModule = translateModuleToLLVMIR(*m);