diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-03 18:22:42 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-03 18:22:42 +0000 |
commit | 8f092252d3fe75064abe330e0e6f75e213f4ac06 (patch) | |
tree | 80a1db4e72aaefe86e2c512f7bac67993fae7cfb /include/llvm/Target | |
parent | 3a5797d94662d1e3cd52ade56bc16e159ec05838 (diff) | |
download | external_llvm-8f092252d3fe75064abe330e0e6f75e213f4ac06.zip external_llvm-8f092252d3fe75064abe330e0e6f75e213f4ac06.tar.gz external_llvm-8f092252d3fe75064abe330e0e6f75e213f4ac06.tar.bz2 |
Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/DarwinTargetAsmInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/ELFTargetAsmInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h index a99e16d..5813ce3 100644 --- a/include/llvm/Target/DarwinTargetAsmInfo.h +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -44,8 +44,6 @@ namespace llvm { const Section* MergeableConstSection(const Type *Ty) const; const Section* MergeableStringSection(const GlobalVariable *GV) const; const Section* SelectSectionForMachineConst(const Type *Ty) const; - protected: - const TargetMachine* DTM; }; } diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h index 593d9b1..d065df3 100644 --- a/include/llvm/Target/ELFTargetAsmInfo.h +++ b/include/llvm/Target/ELFTargetAsmInfo.h @@ -33,8 +33,6 @@ namespace llvm { const Section* MergeableStringSection(const GlobalVariable *GV) const; virtual const Section* SelectSectionForMachineConst(const Type *Ty) const; - protected: - const TargetMachine* ETM; }; } diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index e3a8a57..44c9e55 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -126,6 +126,9 @@ namespace llvm { mutable SectionFlags::FlagsStringsMapType FlagsStrings; void fillDefaultValues(); protected: + /// TM - The current TargetMachine. + const TargetMachine &TM; + //===------------------------------------------------------------------===// // Properties to be set by the target writer, used to configure asm printer. // @@ -510,8 +513,7 @@ namespace llvm { const char *const *AsmTransCBE; // Defaults to empty public: - TargetAsmInfo(); - TargetAsmInfo(const TargetMachine &TM); + explicit TargetAsmInfo(const TargetMachine &TM); virtual ~TargetAsmInfo(); const Section* getNamedSection(const char *Name, |