diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 27 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 17 |
2 files changed, 27 insertions, 17 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 15b6aa1..41c1717 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -37,6 +37,18 @@ namespace llvm { //===------------------------------------------------------------------===// // Properties to be set by the target writer, used to configure asm printer. // + + /// PointerSize - Pointer size in bytes. + /// Default is 4. + unsigned PointerSize; + + /// IsLittleEndian - True if target is little endian. + /// Default is true. + bool IsLittleEndian; + + /// StackGrowsUp - True if target stack grow up. + /// Default is false. + bool StackGrowsUp; /// HasSubsectionsViaSymbols - True if this target has the MachO /// .subsections_via_symbols directive. @@ -300,6 +312,21 @@ namespace llvm { static unsigned getSLEB128Size(int Value); static unsigned getULEB128Size(unsigned Value); + /// getPointerSize - Get the pointer size in bytes. + unsigned getPointerSize() const { + return PointerSize; + } + + /// islittleendian - True if the target is little endian. + bool isLittleEndian() const { + return IsLittleEndian; + } + + /// isStackGrowthDirectionUp - True if target stack grow up. + bool isStackGrowthDirectionUp() const { + return StackGrowsUp; + } + bool hasSubsectionsViaSymbols() const { return HasSubsectionsViaSymbols; } // Data directive accessors. diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 96e085d..5a526dc 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -28,9 +28,6 @@ namespace llvm { class TargetLoweringObjectFile; class TargetAsmInfo { - unsigned PointerSize; - bool IsLittleEndian; - TargetFrameLowering::StackDirection StackDir; std::vector<MachineMove> InitialFrameState; const TargetRegisterInfo *TRI; const TargetFrameLowering *TFI; @@ -39,20 +36,6 @@ class TargetAsmInfo { public: explicit TargetAsmInfo(const TargetMachine &TM); - /// getPointerSize - Get the pointer size in bytes. - unsigned getPointerSize() const { - return PointerSize; - } - - /// islittleendian - True if the target is little endian. - bool isLittleEndian() const { - return IsLittleEndian; - } - - TargetFrameLowering::StackDirection getStackGrowthDirection() const { - return StackDir; - } - const MCSection *getDwarfLineSection() const { return TLOF->getDwarfLineSection(); } |