diff options
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetAsmBackend.h | 4 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 75 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegistry.h | 9 |
3 files changed, 8 insertions, 80 deletions
diff --git a/include/llvm/Target/TargetAsmBackend.h b/include/llvm/Target/TargetAsmBackend.h index e204a5fed5..4805e1966f 100644 --- a/include/llvm/Target/TargetAsmBackend.h +++ b/include/llvm/Target/TargetAsmBackend.h @@ -21,6 +21,7 @@ class MCObjectWriter; class MCSection; template<typename T> class SmallVectorImpl; +class Target; class raw_ostream; /// TargetAsmBackend - Generic interface to target specific assembler backends. @@ -80,6 +81,9 @@ public: return true; } + /// getPointerSize - Get the pointer size in bytes. + virtual unsigned getPointerSize() const = 0; + /// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided /// data fragment, at the offset specified by the fixup and following the /// fixup kind as appropriate. diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h deleted file mode 100644 index cfe60e671a..0000000000 --- a/include/llvm/Target/TargetAsmInfo.h +++ /dev/null @@ -1,75 +0,0 @@ -//===-- llvm/Target/TargetAsmInfo.h -----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Interface to provide the information necessary for producing assembly files. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TARGET_TARGETASMINFO_H -#define LLVM_TARGET_TARGETASMINFO_H - -#include "llvm/CodeGen/MachineLocation.h" -#include "llvm/Target/TargetLoweringObjectFile.h" -#include "llvm/Target/TargetFrameInfo.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - class MCSection; - class MCContext; - class TargetMachine; - class TargetLoweringObjectFile; - -class TargetAsmInfo { - unsigned PointerSize; - bool IsLittleEndian; - TargetFrameInfo::StackDirection StackDir; - const TargetRegisterInfo *TRI; - std::vector<MachineMove> InitialFrameState; - const TargetLoweringObjectFile *TLOF; - -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; - } - - TargetFrameInfo::StackDirection getStackGrowthDirection() const { - return StackDir; - } - - const MCSection *getDwarfLineSection() const { - return TLOF->getDwarfLineSection(); - } - - const MCSection *getEHFrameSection() const { - return TLOF->getEHFrameSection(); - } - - unsigned getDwarfRARegNum(bool isEH) const { - return TRI->getDwarfRegNum(TRI->getRARegister(), isEH); - } - - const std::vector<MachineMove> &getInitialFrameState() const { - return InitialFrameState; - } - - int getDwarfRegNum(unsigned RegNum, bool isEH) const { - return TRI->getDwarfRegNum(RegNum, isEH); - } -}; - -} -#endif diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h index fe2146b8d8..abffb5852a 100644 --- a/include/llvm/Target/TargetRegistry.h +++ b/include/llvm/Target/TargetRegistry.h @@ -42,8 +42,7 @@ namespace llvm { class formatted_raw_ostream; MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, - bool isVerboseAsm, - bool useLoc, + bool isLittleEndian, bool isVerboseAsm, MCInstPrinter *InstPrint, MCCodeEmitter *CE, bool ShowInst); @@ -91,8 +90,8 @@ namespace llvm { bool RelaxAll); typedef MCStreamer *(*AsmStreamerCtorTy)(MCContext &Ctx, formatted_raw_ostream &OS, + bool isLittleEndian, bool isVerboseAsm, - bool useLoc, MCInstPrinter *InstPrint, MCCodeEmitter *CE, bool ShowInst); @@ -319,13 +318,13 @@ namespace llvm { /// createAsmStreamer - Create a target specific MCStreamer. MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, + bool isLittleEndian, bool isVerboseAsm, - bool useLoc, MCInstPrinter *InstPrint, MCCodeEmitter *CE, bool ShowInst) const { // AsmStreamerCtorFn is default to llvm::createAsmStreamer - return AsmStreamerCtorFn(Ctx, OS, isVerboseAsm, useLoc, + return AsmStreamerCtorFn(Ctx, OS, isLittleEndian, isVerboseAsm, InstPrint, CE, ShowInst); } |