Add support for reading and writing pointersize/endianness to and from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5839 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 03a6c46..f97d7e2 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -43,8 +43,8 @@
// Emit the top level CLASS block.
BytecodeBlock ModuleBlock(BytecodeFormat::Module, Out);
- bool isBigEndian = true;
- bool hasLongPointers = true;
+ bool isBigEndian = M->isBigEndian();
+ bool hasLongPointers = M->has64BitPointers();
// Output the version identifier... we are currently on bytecode version #2
unsigned Version = (2 << 4) | isBigEndian | (hasLongPointers << 1);