/data/llvm-project/mlir/examples/toy/Ch4/toyc.cpp:119:5: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
applyPassManagerCLOptions(pm);
^~~~~~~~~~~~~~~~~~~~~~~~~ ~~
1 error generated.
/data/llvm-project/flang/lib/Frontend/FrontendActions.cpp:669:3: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
mlir::applyPassManagerCLOptions(pm);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
1 error generated.
// Create the pass pipeline
fir::createMLIRToLLVMPassPipeline(pm, level, opts.StackArrays,
opts.Underscoring, opts.getDebugInfo());
- mlir::applyPassManagerCLOptions(pm);
+ (void)mlir::applyPassManagerCLOptions(pm);
// run the pass manager
if (!mlir::succeeded(pm.run(*mlirModule))) {
mlir::PassManager pm(mlirModule->getName(),
mlir::OpPassManager::Nesting::Implicit);
pm.enableVerifier(/*verifyPasses=*/true);
- mlir::applyPassManagerCLOptions(pm);
+ (void)mlir::applyPassManagerCLOptions(pm);
if (passPipeline.hasAnyOccurrences()) {
// run the command-line specified pipeline
(void)passPipeline.addToPipeline(pm, [&](const llvm::Twine &msg) {
mlir::PassManager pm((*owningRef)->getName(),
mlir::OpPassManager::Nesting::Implicit);
pm.enableVerifier(/*verifyPasses=*/true);
- mlir::applyPassManagerCLOptions(pm);
+ (void)mlir::applyPassManagerCLOptions(pm);
if (emitFir) {
// parse the input and pretty-print it back out
// -emit-fir intentionally disables all the passes
if (enableOpt) {
mlir::PassManager pm(module.get()->getName());
// Apply any generic pass manager command line options and run the pipeline.
- applyPassManagerCLOptions(pm);
+ (void)applyPassManagerCLOptions(pm);
// Add a run of the canonicalizer to optimize the mlir module.
pm.addNestedPass<mlir::toy::FuncOp>(mlir::createCanonicalizerPass());
if (enableOpt) {
mlir::PassManager pm(module.get()->getName());
// Apply any generic pass manager command line options and run the pipeline.
- applyPassManagerCLOptions(pm);
+ (void)applyPassManagerCLOptions(pm);
// Inline all functions into main and then delete them.
pm.addPass(mlir::createInlinerPass());
mlir::PassManager pm(module.get()->getName());
// Apply any generic pass manager command line options and run the pipeline.
- applyPassManagerCLOptions(pm);
+ (void)applyPassManagerCLOptions(pm);
// Check to see what granularity of MLIR we are compiling to.
bool isLoweringToAffine = emitAction >= Action::DumpMLIRAffine;
mlir::PassManager pm(module.get()->getName());
// Apply any generic pass manager command line options and run the pipeline.
- applyPassManagerCLOptions(pm);
+ (void)applyPassManagerCLOptions(pm);
// Check to see what granularity of MLIR we are compiling to.
bool isLoweringToAffine = emitAction >= Action::DumpMLIRAffine;
mlir::PassManager pm(module.get()->getName());
// Apply any generic pass manager command line options and run the pipeline.
- applyPassManagerCLOptions(pm);
+ (void)applyPassManagerCLOptions(pm);
// Check to see what granularity of MLIR we are compiling to.
bool isLoweringToAffine = emitAction >= Action::DumpMLIRAffine;