give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
[oota-llvm.git] / include / llvm / MC / MCAsmInfo.h
index 0be27530f27149af10f1f6129599644ea23b4935..7ca7ecba6ff95c638f28cd1d970a4048247ef9cd 100644 (file)
@@ -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);