setListener is dangerous because an already registered listener may accidentally be overwritten/replaced. (A ForwardingListener must be used in such cases.) This change updates a few trivial call sites of setListener, where no forwarding listener is needed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for the fix! LGTM!
mlir/lib/Transforms/Utils/OneToNTypeConversion.cpp | ||
---|---|---|
293 | Just to spell it out for me: this is a trivial case because setListener is called a few lines after the construction of the rewriter, so no other listener can be attached already and replaced by the call, right? |
mlir/lib/Transforms/Utils/OneToNTypeConversion.cpp | ||
---|---|---|
293 | Yes that's correct. |
Just to spell it out for me: this is a trivial case because setListener is called a few lines after the construction of the rewriter, so no other listener can be attached already and replaced by the call, right?