Skip to content

Commit

Permalink
Fix -Werror=dangling-pointer errors reported linux-aarch64 gcc buil…
Browse files Browse the repository at this point in the history
…d. (iree-org#19351)

Another tentative fix for iree-org#19264.
This was not fixed by iree-org#19265.

(Untested beyond what presubmit covers)
  • Loading branch information
ScottTodd authored Dec 3, 2024
1 parent 529cd89 commit 263dcf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ class ConcretizePadResultShapePass final
auto funcOp = getOperation();

ConfigTrackingListener listener;
GreedyRewriteConfig config;
config.listener = &listener;

{
RewritePatternSet patterns(context);
populateConcretizePadResultShapePatterns(patterns);
GreedyRewriteConfig config;
config.listener = &listener;
if (failed(applyPatternsAndFoldGreedily(funcOp, std::move(patterns),
config))) {
return signalPassFailure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ struct ConfigTrackingCanonicalizerPass final
config.listener = &listener;
LogicalResult didConverge =
applyPatternsAndFoldGreedily(getOperation(), *patterns, config);
config.listener = nullptr;
if (this->testConvergence && failed(didConverge)) {
getOperation()->emitError("Canonicalizer failed to converge");
return signalPassFailure();
Expand Down

0 comments on commit 263dcf0

Please sign in to comment.