mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Fix 80-column.
Simplify code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3bc8a3d3af
commit
667f826622
@ -90,7 +90,9 @@ namespace bitc {
|
||||
TYPE_CODE_OPAQUE = 6, // OPAQUE
|
||||
TYPE_CODE_INTEGER = 7, // INTEGER: [width]
|
||||
TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
|
||||
TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty, paramty x N]
|
||||
|
||||
TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
|
||||
// paramty x N]
|
||||
|
||||
// Code #10 is unused.
|
||||
|
||||
|
@ -201,11 +201,12 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
|
||||
Stream.EnterSubblock(bitc::TYPE_BLOCK_ID_NEW, 4 /*count from # abbrevs */);
|
||||
SmallVector<uint64_t, 64> TypeVals;
|
||||
|
||||
uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1);
|
||||
|
||||
// Abbrev for TYPE_CODE_POINTER.
|
||||
BitCodeAbbrev *Abbv = new BitCodeAbbrev();
|
||||
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
|
||||
Log2_32_Ceil(VE.getTypes().size()+1)));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
|
||||
Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0
|
||||
unsigned PtrAbbrev = Stream.EmitAbbrev(Abbv);
|
||||
|
||||
@ -214,8 +215,8 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
|
||||
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
|
||||
Log2_32_Ceil(VE.getTypes().size()+1)));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
|
||||
|
||||
unsigned FunctionAbbrev = Stream.EmitAbbrev(Abbv);
|
||||
|
||||
// Abbrev for TYPE_CODE_STRUCT_ANON.
|
||||
@ -223,8 +224,8 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
|
||||
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_ANON));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
|
||||
Log2_32_Ceil(VE.getTypes().size()+1)));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
|
||||
|
||||
unsigned StructAnonAbbrev = Stream.EmitAbbrev(Abbv);
|
||||
|
||||
// Abbrev for TYPE_CODE_STRUCT_NAME.
|
||||
@ -239,16 +240,16 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
|
||||
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_NAMED));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
|
||||
Log2_32_Ceil(VE.getTypes().size()+1)));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
|
||||
|
||||
unsigned StructNamedAbbrev = Stream.EmitAbbrev(Abbv);
|
||||
|
||||
// Abbrev for TYPE_CODE_ARRAY.
|
||||
Abbv = new BitCodeAbbrev();
|
||||
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_ARRAY));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // size
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
|
||||
Log2_32_Ceil(VE.getTypes().size()+1)));
|
||||
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
|
||||
|
||||
unsigned ArrayAbbrev = Stream.EmitAbbrev(Abbv);
|
||||
|
||||
// Emit an entry count so the reader can reserve space.
|
||||
|
Loading…
x
Reference in New Issue
Block a user