diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-08 20:14:13 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-08 20:14:13 +0000 |
| commit | 8011f5f60a638f58c2e00973e1b3391fc362d6b2 (patch) | |
| tree | 4cf9df200e26dc13503b4d8654c6beb95a5a864a /include/llvm/Target/TargetLoweringObjectFile.h | |
| parent | d82e096e2812d4306de9438f1fc935d5cbc64657 (diff) | |
| download | external_llvm-8011f5f60a638f58c2e00973e1b3391fc362d6b2.zip external_llvm-8011f5f60a638f58c2e00973e1b3391fc362d6b2.tar.gz external_llvm-8011f5f60a638f58c2e00973e1b3391fc362d6b2.tar.bz2 | |
sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
| -rw-r--r-- | include/llvm/Target/TargetLoweringObjectFile.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index 0972dcd..e9533c4 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -80,12 +80,11 @@ protected: const MCSection *DwarfRangesSection; const MCSection *DwarfMacroInfoSection; -protected: - const MCSection *getOrCreateSection(const char *Name, - bool isDirective, - SectionKind K) const; public: + MCContext &getContext() const { return *Ctx; } + + virtual ~TargetLoweringObjectFile(); /// Initialize - this method must be called before any actual lowering is @@ -206,6 +205,11 @@ protected: const MCSection *MergeableConst4Section; const MCSection *MergeableConst8Section; const MCSection *MergeableConst16Section; + +protected: + const MCSection *getOrCreateSection(const char *Name, + bool isDirective, + SectionKind K) const; public: /// ELF Constructor - AtIsCommentChar is true if the CommentCharacter from TAI /// is "@". @@ -213,9 +217,8 @@ public: // FIXME: REMOVE AFTER UNIQUING IS FIXED. bool hasCrazyBSS = false) : AtIsCommentChar(atIsCommentChar), HasCrazyBSS(hasCrazyBSS) {} - - virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); + virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); /// getSectionForConstant - Given a constant with the SectionKind, return a /// section that it should be placed in. @@ -247,6 +250,10 @@ class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { const MCSection *FourByteConstantSection; const MCSection *EightByteConstantSection; const MCSection *SixteenByteConstantSection; +protected: + const MCSection *getOrCreateSection(const char *Name, + bool isDirective, + SectionKind K) const; public: virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); @@ -276,6 +283,10 @@ public: class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile { +protected: + const MCSection *getOrCreateSection(const char *Name, + bool isDirective, + SectionKind K) const; public: virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); |
