summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-08 20:14:13 +0000
committerChris Lattner <sabre@nondot.org>2009-08-08 20:14:13 +0000
commitfbf1d271e6a7157c1b5432e84d5633f63869b5a8 (patch)
tree4cf9df200e26dc13503b4d8654c6beb95a5a864a /include/llvm/Target/TargetLoweringObjectFile.h
parentd34ab83c1658b60ce7dd3cdaf955c808dd742b21 (diff)
downloadllvm-fbf1d271e6a7157c1b5432e84d5633f63869b5a8.tar.gz
llvm-fbf1d271e6a7157c1b5432e84d5633f63869b5a8.tar.bz2
llvm-fbf1d271e6a7157c1b5432e84d5633f63869b5a8.tar.xz
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.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 0972dcde07..e9533c4da2 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);