diff options
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 6 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfoCOFF.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfoDarwin.h | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 0be2753..7ca7ecb 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -24,6 +24,7 @@ namespace llvm { namespace ExceptionHandling { enum ExceptionsType { None, Dwarf, SjLj }; } class MCAsmInfo { + bool IsLittleEndian; protected: //===------------------------------------------------------------------===// // Properties to be set by the target writer, used to configure asm printer. @@ -285,9 +286,12 @@ namespace llvm { const char *const *AsmTransCBE; // Defaults to empty public: - explicit MCAsmInfo(); + explicit MCAsmInfo(bool isLittleEndian); virtual ~MCAsmInfo(); + bool isLittleEndian() const { return IsLittleEndian; } + bool isBigEndian() const { return !IsLittleEndian; } + /// getSLEB128Size - Compute the number of bytes required for a signed /// leb128 value. static unsigned getSLEB128Size(int Value); diff --git a/include/llvm/MC/MCAsmInfoCOFF.h b/include/llvm/MC/MCAsmInfoCOFF.h index a3ee159..97e9aee 100644 --- a/include/llvm/MC/MCAsmInfoCOFF.h +++ b/include/llvm/MC/MCAsmInfoCOFF.h @@ -15,7 +15,7 @@ namespace llvm { class MCAsmInfoCOFF : public MCAsmInfo { protected: - explicit MCAsmInfoCOFF(); + explicit MCAsmInfoCOFF(bool isLittleEndian); }; } diff --git a/include/llvm/MC/MCAsmInfoDarwin.h b/include/llvm/MC/MCAsmInfoDarwin.h index c85aa3d..f5e897d 100644 --- a/include/llvm/MC/MCAsmInfoDarwin.h +++ b/include/llvm/MC/MCAsmInfoDarwin.h @@ -24,7 +24,7 @@ namespace llvm { class Mangler; struct MCAsmInfoDarwin : public MCAsmInfo { - explicit MCAsmInfoDarwin(); + explicit MCAsmInfoDarwin(bool isLittleEndian); }; } |