[mlir][Linalg] Fix ASAN bug
authorNicolas Vasilache <ntv@google.com>
Thu, 1 Oct 2020 10:57:35 +0000 (06:57 -0400)
committerNicolas Vasilache <ntv@google.com>
Thu, 1 Oct 2020 10:57:35 +0000 (06:57 -0400)
commita81b938b6dee0e1ed4dd44e7d59325d0aa4774cc
tree4f1179d2ac33ec0595c4303eb5f67c1db5023ea4
parent69acdfe075fa8eb18781f88f4d0cd1ea40fa6e48
[mlir][Linalg] Fix ASAN bug

```
 LinalgTilingOptions &setTileSizes(ValueRange ts)
```
makes it all too easy to create stack-use-after-return errors.

In particular, c694588fc52a8845174fee06ad0bcfa338e87816 introduced one such issue.

Instead just take a copy in the lambda and be done with it.
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h