[llvm-commits] [PATCH] [Support][Endian] Add support for specifying the alignment and native unaligned types.

Michael Spencer bigcheesegs at gmail.com
Mon Dec 10 15:34:22 PST 2012



================
Comment at: include/llvm/Support/Endian.h:111
@@ -111,6 +110,3 @@
   operator value_type() const {
-    return endian::read_be<value_type, unaligned>(Value);
-  }
-  void operator=(value_type newValue) {
-    endian::write_be<value_type, unaligned>((void *)&Value, newValue);
+    return endian::read<value_type, endian, alignment>((void*)Value.Storage);
   }
----------------
Oops. Casting away const here.


http://llvm-reviews.chandlerc.com/D200



More information about the llvm-commits mailing list