- bool isMergeableCString() const { return K == MergeableCString; }
- bool isMergeableConst() const {
- return K == MergeableConst || K == MergeableConst4 ||
- K == MergeableConst8 || K == MergeableConst16;
- }
-
- bool isMergeableConst4() const { return K == MergeableConst4; }
- bool isMergeableConst8() const { return K == MergeableConst8; }
- bool isMergeableConst16() const { return K == MergeableConst16; }
-
- bool isWriteable() const {
- return isThreadLocal() || isGlobalWriteableData();
- }
-
- bool isThreadLocal() const {
- return K == ThreadData || K == ThreadBSS;
- }
-
- bool isThreadBSS() const { return K == ThreadBSS; }
- bool isThreadData() const { return K == ThreadData; }
-
- bool isGlobalWriteableData() const {
- return isBSS() || isDataRel() || isReadOnlyWithRel();
- }
-
- bool isBSS() const { return K == BSS; }
-
- bool isDataRel() const {
- return K == DataRel || K == DataRelLocal || K == DataNoRel;
- }
-
- bool isDataRelLocal() const {
- return K == DataRelLocal || K == DataNoRel;
- }
-
- bool isDataNoRel() const { return K == DataNoRel; }
-
- bool isReadOnlyWithRel() const {
- return K == ReadOnlyWithRel || K == ReadOnlyWithRelLocal;
- }
-
- bool isReadOnlyWithRelLocal() const {
- return K == ReadOnlyWithRelLocal;
- }
-
- static SectionKind get(Kind K, bool isWeak = false,
- bool hasExplicitSection = false) {
- SectionKind Res;
- Res.K = K;
- Res.Weak = isWeak;
- Res.ExplicitSection = hasExplicitSection;
- return Res;
- }
-};
-
-
-class TargetLoweringObjectFile {
- MCContext *Ctx;
-protected:
-
- TargetLoweringObjectFile();
-
- /// TextSection - Section directive for standard text.
- ///
- const MCSection *TextSection; // Defaults to ".text".
-
- /// DataSection - Section directive for standard data.
- ///
- const MCSection *DataSection; // Defaults to ".data".
-
-
-
- // FIXME: SINK THESE.
- const MCSection *BSSSection_;
-
- /// ReadOnlySection - This is the directive that is emitted to switch to a
- /// read-only section for constant data (e.g. data declared const,
- /// jump tables).
- const MCSection *ReadOnlySection; // Defaults to NULL
-
- /// TLSDataSection - Section directive for Thread Local data.
- ///
- const MCSection *TLSDataSection; // Defaults to ".tdata".
-
- /// TLSBSSSection - Section directive for Thread Local uninitialized data.
- /// Null if this target doesn't support a BSS section.
- ///
- const MCSection *TLSBSSSection; // Defaults to ".tbss".
-
- const MCSection *CStringSection_;
-
-public:
- // FIXME: NONPUB.
- const MCSection *getOrCreateSection(const char *Name,
- bool isDirective,
- SectionKind::Kind K) const;
-public: