diff options
Diffstat (limited to 'include/llvm/Support/EndianStream.h')
-rw-r--r-- | include/llvm/Support/EndianStream.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/llvm/Support/EndianStream.h b/include/llvm/Support/EndianStream.h index 94f372f..d44a9b3 100644 --- a/include/llvm/Support/EndianStream.h +++ b/include/llvm/Support/EndianStream.h @@ -31,6 +31,31 @@ template <endianness endian> struct Writer { OS.write((const char *)&Val, sizeof(value_type)); } }; + +template <> +template <> +inline void Writer<little>::write<float>(float Val) { + write(FloatToBits(Val)); +} + +template <> +template <> +inline void Writer<little>::write<double>(double Val) { + write(DoubleToBits(Val)); +} + +template <> +template <> +inline void Writer<big>::write<float>(float Val) { + write(FloatToBits(Val)); +} + +template <> +template <> +inline void Writer<big>::write<double>(double Val) { + write(DoubleToBits(Val)); +} + } // end namespace endian } // end namespace support |