forked from OSchip/llvm-project
Fix clang-tidy warnings in MLIR Python bindings (NFC)
This commit is contained in:
parent
c1ca9e3077
commit
e2f16be599
|
@ -555,6 +555,7 @@ void mlir::python::populateIRAffine(py::module &m) {
|
|||
mlirAffineMapCompressUnusedSymbols(
|
||||
maps.data(), maps.size(), compressed.data(), populate);
|
||||
std::vector<PyAffineMap> res;
|
||||
res.reserve(compressed.size());
|
||||
for (auto m : compressed)
|
||||
res.push_back(PyAffineMap(context->getRef(), m));
|
||||
return res;
|
||||
|
|
|
@ -1976,7 +1976,7 @@ void mlir::python::populateIRCore(py::module &m) {
|
|||
if (frames.empty())
|
||||
throw py::value_error("No caller frames provided");
|
||||
MlirLocation caller = frames.back().get();
|
||||
for (PyLocation frame :
|
||||
for (const PyLocation &frame :
|
||||
llvm::reverse(llvm::makeArrayRef(frames).drop_back()))
|
||||
caller = mlirLocationCallSiteGet(frame.get(), caller);
|
||||
return PyLocation(context->getRef(),
|
||||
|
|
Loading…
Reference in New Issue