[Mlir-commits] [mlir] [MLIR][Python] Remove partial LLVM APIs in python bindings (5/n) (PR #180644)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Feb 10 06:48:07 PST 2026
================
@@ -122,6 +122,48 @@ subsequent processing.
type or if the buffer does not meet expectations.
)";
+namespace {
+/// Local helper checking if the current machine is little endian.
+bool isLittleEndian() {
+#if defined(__cpp_lib_endian)
+ return std::endian::native == std::endian::little;
+#else
+ const uint16_t value = 1;
+ return *reinterpret_cast<const uint8_t *>(&value) == 1;
----------------
RattataKing wrote:
thanks!
https://github.com/llvm/llvm-project/pull/180644
More information about the Mlir-commits
mailing list