Commit dc7376d
committed
[MLIR] Fix use-after-move issues
This patch addresses two use-after-move issues:
1. Timing.cpp
A variable was std::moved and then immediately passed to an assert() check. Since the moved-from state made the assertion condition trivially true, the check was effectively useless. The assert() is removed.
2. Query.cpp
The `matcher` object was moved-from and then subsequently used as if it still retained valid state. The fix removes the std::move to preserve the original object.
It is possible to restructure the surrounding logic to maintain the move semantics, but doing so would reduce clarity. If needed, such restructuring can be considered later based on performance profiling.
Testing:
ninja check-mlir1 parent 4c46ae3 commit dc7376d
2 files changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | 322 | | |
324 | 323 | | |
325 | 324 | | |
| |||
0 commit comments