inline void BytecodeWriter::output(const std::string &s) {
unsigned Len = s.length();
- output_vbr(Len ); // Strings may have an arbitrary length...
+ output_vbr(Len); // Strings may have an arbitrary length.
Out.insert(Out.end(), s.begin(), s.end());
}
/// FIXME: This isn't optimal, it has size problems on some platforms
/// where FP is not IEEE.
uint32_t i = FloatToBits(FloatVal);
- Out.push_back( static_cast<unsigned char>( (i & 0xFF )));
- Out.push_back( static_cast<unsigned char>( (i >> 8) & 0xFF));
+ Out.push_back( static_cast<unsigned char>( (i ) & 0xFF));
+ Out.push_back( static_cast<unsigned char>( (i >> 8 ) & 0xFF));
Out.push_back( static_cast<unsigned char>( (i >> 16) & 0xFF));
Out.push_back( static_cast<unsigned char>( (i >> 24) & 0xFF));
}
/// FIXME: This isn't optimal, it has size problems on some platforms
/// where FP is not IEEE.
uint64_t i = DoubleToBits(DoubleVal);
- Out.push_back( static_cast<unsigned char>( (i & 0xFF )));
- Out.push_back( static_cast<unsigned char>( (i >> 8) & 0xFF));
+ Out.push_back( static_cast<unsigned char>( (i ) & 0xFF));
+ Out.push_back( static_cast<unsigned char>( (i >> 8 ) & 0xFF));
Out.push_back( static_cast<unsigned char>( (i >> 16) & 0xFF));
Out.push_back( static_cast<unsigned char>( (i >> 24) & 0xFF));
Out.push_back( static_cast<unsigned char>( (i >> 32) & 0xFF));
: Out(o), Table(M) {
// Emit the signature...
- static const unsigned char *Sig = (const unsigned char*)"llvm";
+ static const unsigned char *Sig = (const unsigned char*)"llvm";
output_data(Sig, Sig+4);
// Emit the top level CLASS block.
// The Global type plane comes first
{
- BytecodeBlock CPool(BytecodeFormat::GlobalTypePlaneBlockID, *this );
- outputTypes(Type::FirstDerivedTyID);
+ BytecodeBlock CPool(BytecodeFormat::GlobalTypePlaneBlockID, *this);
+ outputTypes(Type::FirstDerivedTyID);
}
// The ModuleInfoBlock follows directly after the type information
// The compaction types may have been uncompactified back to the
// global types. If so, we just write an empty table
- if (CTypes.size() == 0 ) {
+ if (CTypes.size() == 0) {
output_vbr(0U);
return;
}
// Write each of the types
for (SymbolTable::type_const_iterator TI = MST.type_begin(),
- TE = MST.type_end(); TI != TE; ++TI ) {
+ TE = MST.type_end(); TI != TE; ++TI) {
// Symtab entry:[def slot #][name]
output_typeid((unsigned)Table.getSlot(TI->second));
output(TI->first);
}
void llvm::WriteBytecodeToFile(const Module *M, std::ostream &Out,
- bool compress ) {
+ bool compress) {
assert(M && "You can't write a null module!!");
// Make sure that std::cout is put into binary mode for systems
// make sure it hits disk now
Out.flush();
}
-