From 5e3a082c797f0214d44858b05a13543872dfd413 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 18 Oct 2011 19:31:59 +0000 Subject: Object/COFF: Change type from a struct to a uint16_t. The struct would be incorrect for bigendian systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142403 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/COFF.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/llvm/Object/COFF.h') diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index db05c98aaf..1f577c7433 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -45,13 +45,18 @@ struct coff_symbol { support::ulittle32_t Value; support::little16_t SectionNumber; - struct { - support::ulittle8_t BaseType; - support::ulittle8_t ComplexType; - } Type; + support::ulittle16_t Type; support::ulittle8_t StorageClass; support::ulittle8_t NumberOfAuxSymbols; + + uint8_t getBaseType() const { + return Type & 0x0F; + } + + uint8_t getComplexType() const { + return (Type & 0xF0) >> 4; + } }; struct coff_section { -- cgit v1.2.3