aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-12 23:55:02 +0000
committerChris Lattner <sabre@nondot.org>2009-08-12 23:55:02 +0000
commit5dc47ff03975b9adde9dd833db2b646eb4295710 (patch)
tree2cb64d62d0e905a2919359e9aed3eb4f2086dc63 /include/llvm/Target/TargetLoweringObjectFile.h
parent9bf0b9bd44d356690e936ae16bec2c115c7d9f5f (diff)
implement support for uniquing MachO sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index b6710821ed..cbb585e131 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -20,6 +20,7 @@
namespace llvm {
class Mangler;
class MCSection;
+ class MCSectionMachO;
class MCContext;
class GlobalValue;
class StringRef;
@@ -28,6 +29,9 @@ namespace llvm {
class TargetLoweringObjectFile {
MCContext *Ctx;
+
+ TargetLoweringObjectFile(const TargetLoweringObjectFile&); // DO NOT IMPLEMENT
+ void operator=(const TargetLoweringObjectFile&); // DO NOT IMPLEMENT
protected:
TargetLoweringObjectFile();
@@ -225,6 +229,8 @@ public:
class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile {
+ mutable void *UniquingMap;
+
const MCSection *CStringSection;
const MCSection *UStringSection;
const MCSection *TextCoalSection;
@@ -236,6 +242,8 @@ class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile {
const MCSection *EightByteConstantSection;
const MCSection *SixteenByteConstantSection;
public:
+ TargetLoweringObjectFileMachO() : UniquingMap(0) {}
+ ~TargetLoweringObjectFileMachO();
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
@@ -257,16 +265,17 @@ public:
/// getMachOSection - Return the MCSection for the specified mach-o section.
/// This requires the operands to be valid.
- const MCSection *getMachOSection(const StringRef &Segment,
- const StringRef &Section,
- unsigned TypeAndAttributes,
- SectionKind K) const {
+ const MCSectionMachO *getMachOSection(const StringRef &Segment,
+ const StringRef &Section,
+ unsigned TypeAndAttributes,
+ SectionKind K) const {
return getMachOSection(Segment, Section, TypeAndAttributes, 0, K);
}
- const MCSection *getMachOSection(const StringRef &Segment,
- const StringRef &Section,
- unsigned TypeAndAttributes,
- unsigned Reserved2, SectionKind K) const;
+ const MCSectionMachO *getMachOSection(const StringRef &Segment,
+ const StringRef &Section,
+ unsigned TypeAndAttributes,
+ unsigned Reserved2,
+ SectionKind K) const;
/// getTextCoalSection - Return the "__TEXT,__textcoal_nt" section we put weak
/// symbols into.