aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCAsmInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 22:42:28 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 22:42:28 +0000
commitc7b8814bb4f2e6052060d6118d3bc3b66f5c5b0b (patch)
tree8ea6af8d6d1776b8e40c0feed7d63c85f182ae57 /include/llvm/MC/MCAsmInfo.h
parent67847538148ed956aaa14a07a77902fb991445f2 (diff)
downloadexternal_llvm-c7b8814bb4f2e6052060d6118d3bc3b66f5c5b0b.zip
external_llvm-c7b8814bb4f2e6052060d6118d3bc3b66f5c5b0b.tar.gz
external_llvm-c7b8814bb4f2e6052060d6118d3bc3b66f5c5b0b.tar.bz2
give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
I really want clients of the streamer to be able to say "emit this 64-bit integer" and have it get broken down right by the streamer. I may change this in the future, we'll see how it works out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAsmInfo.h')
-rw-r--r--include/llvm/MC/MCAsmInfo.h6
1 files changed, 5 insertions, 1 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);