Index: include/llvm/Object/COFF.h =================================================================== --- include/llvm/Object/COFF.h +++ include/llvm/Object/COFF.h @@ -215,8 +215,8 @@ support::ulittle16_t Type; - support::ulittle8_t StorageClass; - support::ulittle8_t NumberOfAuxSymbols; + uint8_t StorageClass; + uint8_t NumberOfAuxSymbols; }; typedef coff_symbol coff_symbol16; @@ -362,12 +362,12 @@ support::ulittle16_t NumberOfLinenumbers; support::ulittle32_t CheckSum; support::ulittle16_t Number; - support::ulittle8_t Selection; + uint8_t Selection; }; struct coff_aux_clr_token { - support::ulittle8_t AuxType; - support::ulittle8_t Reserved; + uint8_t AuxType; + uint8_t Reserved; support::ulittle32_t SymbolTableIndex; }; Index: include/llvm/Support/ARMWinEH.h =================================================================== --- include/llvm/Support/ARMWinEH.h +++ include/llvm/Support/ARMWinEH.h @@ -353,11 +353,11 @@ return makeArrayRef(&Data[Offset], EpilogueCount()); } - ArrayRef UnwindByteCode() const { + ArrayRef UnwindByteCode() const { const size_t Offset = HeaderWords(*this) + (E() ? 0 : EpilogueCount()); - const support::ulittle8_t *ByteCode = - reinterpret_cast(&Data[Offset]); + const uint8_t *ByteCode = + reinterpret_cast(&Data[Offset]); return makeArrayRef(ByteCode, CodeWords() * sizeof(uint32_t)); } @@ -380,4 +380,3 @@ } #endif - Index: include/llvm/Support/Endian.h =================================================================== --- include/llvm/Support/Endian.h +++ include/llvm/Support/Endian.h @@ -117,8 +117,6 @@ } // end namespace detail typedef detail::packed_endian_specific_integral - ulittle8_t; -typedef detail::packed_endian_specific_integral ulittle16_t; typedef detail::packed_endian_specific_integral ulittle32_t; @@ -126,8 +124,6 @@ ulittle64_t; typedef detail::packed_endian_specific_integral - little8_t; -typedef detail::packed_endian_specific_integral little16_t; typedef detail::packed_endian_specific_integral little32_t; @@ -135,8 +131,6 @@ little64_t; typedef detail::packed_endian_specific_integral - aligned_ulittle8_t; -typedef detail::packed_endian_specific_integral aligned_ulittle16_t; typedef detail::packed_endian_specific_integral aligned_ulittle32_t; @@ -144,8 +138,6 @@ aligned_ulittle64_t; typedef detail::packed_endian_specific_integral - aligned_little8_t; -typedef detail::packed_endian_specific_integral aligned_little16_t; typedef detail::packed_endian_specific_integral aligned_little32_t; @@ -153,8 +145,6 @@ aligned_little64_t; typedef detail::packed_endian_specific_integral - ubig8_t; -typedef detail::packed_endian_specific_integral ubig16_t; typedef detail::packed_endian_specific_integral ubig32_t; @@ -162,8 +152,6 @@ ubig64_t; typedef detail::packed_endian_specific_integral - big8_t; -typedef detail::packed_endian_specific_integral big16_t; typedef detail::packed_endian_specific_integral big32_t; @@ -171,8 +159,6 @@ big64_t; typedef detail::packed_endian_specific_integral - aligned_ubig8_t; -typedef detail::packed_endian_specific_integral aligned_ubig16_t; typedef detail::packed_endian_specific_integral aligned_ubig32_t; @@ -180,8 +166,6 @@ aligned_ubig64_t; typedef detail::packed_endian_specific_integral - aligned_big8_t; -typedef detail::packed_endian_specific_integral aligned_big16_t; typedef detail::packed_endian_specific_integral aligned_big32_t; Index: include/llvm/Support/Win64EH.h =================================================================== --- include/llvm/Support/Win64EH.h +++ include/llvm/Support/Win64EH.h @@ -40,8 +40,8 @@ /// or part thereof. union UnwindCode { struct { - support::ulittle8_t CodeOffset; - support::ulittle8_t UnwindOpAndOpInfo; + uint8_t CodeOffset; + uint8_t UnwindOpAndOpInfo; } u; support::ulittle16_t FrameOffset; @@ -74,10 +74,10 @@ /// UnwindInfo - An entry in the exception table. struct UnwindInfo { - support::ulittle8_t VersionAndFlags; - support::ulittle8_t PrologSize; - support::ulittle8_t NumCodes; - support::ulittle8_t FrameRegisterAndOffset; + uint8_t VersionAndFlags; + uint8_t PrologSize; + uint8_t NumCodes; + uint8_t FrameRegisterAndOffset; UnwindCode UnwindCodes[1]; uint8_t getVersion() const { Index: lib/Object/COFFObjectFile.cpp =================================================================== --- lib/Object/COFFObjectFile.cpp +++ lib/Object/COFFObjectFile.cpp @@ -25,7 +25,6 @@ using namespace llvm; using namespace object; -using support::ulittle8_t; using support::ulittle16_t; using support::ulittle32_t; using support::little16_t; Index: tools/llvm-readobj/ARMWinEHPrinter.h =================================================================== --- tools/llvm-readobj/ARMWinEHPrinter.h +++ tools/llvm-readobj/ARMWinEHPrinter.h @@ -28,55 +28,54 @@ struct RingEntry { uint8_t Mask; uint8_t Value; - bool (Decoder::*Routine)(const support::ulittle8_t *, unsigned &, unsigned, - bool); + bool (Decoder::*Routine)(const uint8_t *, unsigned &, unsigned, bool); }; static const RingEntry Ring[]; - bool opcode_0xxxxxxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_0xxxxxxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_10Lxxxxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_10Lxxxxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_1100xxxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_1100xxxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11010Lxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11010Lxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11011Lxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11011Lxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11100xxx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11100xxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_111010xx(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_111010xx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_1110110L(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_1110110L(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11101110(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11101110(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11101111(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11101111(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11110101(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11110101(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11110110(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11110110(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11110111(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11110111(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111000(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111000(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111001(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111001(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111010(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111010(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111011(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111011(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111100(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111100(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111101(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111101(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111110(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111110(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - bool opcode_11111111(const support::ulittle8_t *Opcodes, unsigned &Offset, + bool opcode_11111111(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); - void decodeOpcodes(ArrayRef Opcodes, unsigned Offset, + void decodeOpcodes(ArrayRef Opcodes, unsigned Offset, bool Prologue); void printRegisters(const std::pair &RegisterMask); @@ -116,4 +115,3 @@ } #endif - Index: tools/llvm-readobj/ARMWinEHPrinter.cpp =================================================================== --- tools/llvm-readobj/ARMWinEHPrinter.cpp +++ tools/llvm-readobj/ARMWinEHPrinter.cpp @@ -233,7 +233,7 @@ return readobj_error::unknown_symbol; } -bool Decoder::opcode_0xxxxxxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_0xxxxxxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint8_t Imm = OC[Offset] & 0x7f; SW.startLine() << format("0x%02x ; %s sp, #(%u * 4)\n", @@ -244,7 +244,7 @@ return false; } -bool Decoder::opcode_10Lxxxxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_10Lxxxxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned Link = (OC[Offset] & 0x20) >> 5; uint16_t RegisterMask = (Link << (Prologue ? 14 : 15)) @@ -263,7 +263,7 @@ return false; } -bool Decoder::opcode_1100xxxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_1100xxxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { if (Prologue) SW.startLine() << format("0x%02x ; mov r%u, sp\n", @@ -275,7 +275,7 @@ return false; } -bool Decoder::opcode_11010Lxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11010Lxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned Link = (OC[Offset] & 0x4) >> 3; unsigned Count = (OC[Offset] & 0x3); @@ -292,7 +292,7 @@ return false; } -bool Decoder::opcode_11011Lxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11011Lxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned Link = (OC[Offset] & 0x4) >> 2; unsigned Count = (OC[Offset] & 0x3) + 4; @@ -309,7 +309,7 @@ return false; } -bool Decoder::opcode_11100xxx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11100xxx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned High = (OC[Offset] & 0x7); uint32_t VFPMask = (((1 << (High + 1)) - 1) << 8); @@ -323,7 +323,7 @@ return false; } -bool Decoder::opcode_111010xx(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_111010xx(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint16_t Imm = ((OC[Offset + 0] & 0x03) << 8) | ((OC[Offset + 1] & 0xff) << 0); @@ -336,7 +336,7 @@ return false; } -bool Decoder::opcode_1110110L(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_1110110L(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint8_t GPRMask = ((OC[Offset + 0] & 0x01) << (Prologue ? 14 : 15)) | ((OC[Offset + 1] & 0xff) << 0); @@ -350,7 +350,7 @@ return false; } -bool Decoder::opcode_11101110(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11101110(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { assert(!Prologue && "may not be used in prologue"); @@ -366,7 +366,7 @@ return false; } -bool Decoder::opcode_11101111(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11101111(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { assert(!Prologue && "may not be used in prologue"); @@ -382,7 +382,7 @@ return false; } -bool Decoder::opcode_11110101(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11110101(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; unsigned End = (OC[Offset + 1] & 0x0f) >> 0; @@ -397,7 +397,7 @@ return false; } -bool Decoder::opcode_11110110(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11110110(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; unsigned End = (OC[Offset + 1] & 0x0f) >> 0; @@ -412,7 +412,7 @@ return false; } -bool Decoder::opcode_11110111(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11110111(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); @@ -425,7 +425,7 @@ return false; } -bool Decoder::opcode_11111000(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111000(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint32_t Imm = (OC[Offset + 1] << 16) | (OC[Offset + 2] << 8) @@ -440,7 +440,7 @@ return false; } -bool Decoder::opcode_11111001(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111001(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); @@ -453,7 +453,7 @@ return false; } -bool Decoder::opcode_11111010(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111010(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint32_t Imm = (OC[Offset + 1] << 16) | (OC[Offset + 2] << 8) @@ -468,41 +468,41 @@ return false; } -bool Decoder::opcode_11111011(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111011(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); ++Offset; return false; } -bool Decoder::opcode_11111100(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111100(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { SW.startLine() << format("0x%02x ; nop.w\n", OC[Offset]); ++Offset; return false; } -bool Decoder::opcode_11111101(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111101(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { SW.startLine() << format("0x%02x ; b\n", OC[Offset]); ++Offset; return true; } -bool Decoder::opcode_11111110(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111110(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { SW.startLine() << format("0x%02x ; b.w\n", OC[Offset]); ++Offset; return true; } -bool Decoder::opcode_11111111(const ulittle8_t *OC, unsigned &Offset, +bool Decoder::opcode_11111111(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { ++Offset; return true; } -void Decoder::decodeOpcodes(ArrayRef Opcodes, unsigned Offset, +void Decoder::decodeOpcodes(ArrayRef Opcodes, unsigned Offset, bool Prologue) { assert((!Prologue || Offset == 0) && "prologue should always use offset 0"); @@ -546,7 +546,7 @@ static_cast(XData.CodeWords() * sizeof(uint32_t))); if (XData.E()) { - ArrayRef UC = XData.UnwindByteCode(); + ArrayRef UC = XData.UnwindByteCode(); if (!XData.F()) { ListScope PS(SW, "Prologue"); decodeOpcodes(UC, 0, /*Prologue=*/true); @@ -741,4 +741,3 @@ } } } -