[Mlir-commits] [mlir] 7e65dc7 - Revert "Apply clang-tidy fixes for misc-include-cleaner in IRCore.cpp (NFC)"
Alex Zinenko
llvmlistbot at llvm.org
Mon Nov 20 01:00:48 PST 2023
Author: Alex Zinenko
Date: 2023-11-20T09:00:40Z
New Revision: 7e65dc72c4251cb7409545686bc2751d50d4efae
URL: https://github.com/llvm/llvm-project/commit/7e65dc72c4251cb7409545686bc2751d50d4efae
DIFF: https://github.com/llvm/llvm-project/commit/7e65dc72c4251cb7409545686bc2751d50d4efae.diff
LOG: Revert "Apply clang-tidy fixes for misc-include-cleaner in IRCore.cpp (NFC)"
This reverts commit 0d109035c29408f06efc148d67aab7e4b2aada5d.
Changes make Python bindings unbuildable without additional cmake
modifications (or modified `$PATH`).
```
/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp:33:10: fatal error: 'funcobject.h' file not found
```
This header is provided by cpython, and we are not looking for that in
cmake.
Moreover, the nature of this change is not very clear to me. Seems to
replace one include with two dozens, presumably because the code is only
using transitively included headers, but the value for readability is
dubious. LLVM is also not strictly following IWYU.
Added:
Modified:
mlir/lib/Bindings/Python/IRCore.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 4aa8df1bd802565..5612f3b960ac7f8 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -17,36 +17,12 @@
#include "mlir-c/Diagnostics.h"
#include "mlir-c/IR.h"
#include "mlir-c/Support.h"
-#include "mlir/Support/LLVM.h"
+#include "mlir/Bindings/Python/PybindAdaptors.h"
#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/Hashing.h"
-#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Twine.h"
-
-#include <cassert>
-#include <cstddef>
-#include <cstdint>
-#include <cstdio>
-#include <exception>
-#include <funcobject.h>
-#include <functional>
+
#include <optional>
-#include <pybind11/attr.h>
-#include <pybind11/cast.h>
-#include <pybind11/detail/common.h>
-#include <pybind11/detail/type_caster_base.h>
-#include <pybind11/gil.h>
-#include <pybind11/pybind11.h>
-#include <pybind11/pytypes.h>
-#include <pyerrors.h>
-#include <stdexcept>
-#include <string>
-#include <string_view>
-#include <tuple>
#include <utility>
-#include <vector>
namespace py = pybind11;
using namespace py::literals;
More information about the Mlir-commits
mailing list