[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 08:42:43 PST 2026
================
@@ -122,6 +122,46 @@ subsequent processing.
type or if the buffer does not meet expectations.
)";
+namespace {
+/// Local helper checking if the current machine is little endian.
+bool isLittleEndian() {
+ const uint16_t value = 1;
+ unsigned char first_byte = 0;
+ std::memcpy(&first_byte, &value, 1);
+ return first_byte == 1;
+}
+
+/// Local helper adapted from llvm::scope_exit.
+template <typename Callable>
----------------
RattataKing wrote:
thanks!
https://github.com/llvm/llvm-project/pull/180644
More information about the Mlir-commits
mailing list