aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-28 22:07:54 +0000
committerChris Lattner <sabre@nondot.org>2006-07-28 22:07:54 +0000
commitc847f7caecd6bf219b219ca45e52fd1f15277805 (patch)
treec3301ff0ad6d8c85325f8f219b8a3c2f3b8bd554 /lib/Bytecode
parent252ad03d7db0add504fdcc6bd67c1bc1e28bdd57 (diff)
formatting cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 4dc80d1809..2fb05f147a 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -131,7 +131,7 @@ inline void BytecodeWriter::output_vbr(int i) {
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());
}
@@ -143,8 +143,8 @@ inline void BytecodeWriter::output_float(float& FloatVal) {
/// 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));
}
@@ -153,8 +153,8 @@ inline void BytecodeWriter::output_double(double& DoubleVal) {
/// 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));
@@ -800,7 +800,7 @@ BytecodeWriter::BytecodeWriter(std::vector<unsigned char> &o, const Module *M)
: 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.
@@ -820,8 +820,8 @@ BytecodeWriter::BytecodeWriter(std::vector<unsigned char> &o, const Module *M)
// 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
@@ -1133,7 +1133,7 @@ void BytecodeWriter::outputCompactionTypes(unsigned StartNo) {
// 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;
}
@@ -1180,7 +1180,7 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
// 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);
@@ -1215,7 +1215,7 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
}
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
@@ -1271,4 +1271,3 @@ void llvm::WriteBytecodeToFile(const Module *M, std::ostream &Out,
// make sure it hits disk now
Out.flush();
}
-