private:
mutable StringMap<Section> Sections;
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.
//
/// 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 char *ReadOnlySection; // Defaults to NULL
- const Section *ReadOnlySection_;
+ const Section *ReadOnlySection; // Defaults to NULL
/// SmallDataSection - This is the directive that is emitted to switch to a
/// small data section.
/// Defaults to "\t.section .dtors,\"aw\",@progbits".
const char *StaticDtorsSection;
- /// FourByteConstantSection, EightByteConstantSection,
- /// SixteenByteConstantSection - These are special sections where we place
- /// 4-, 8-, and 16- byte constant literals.
- const char *FourByteConstantSection;
- const Section *FourByteConstantSection_;
- const char *EightByteConstantSection;
- const Section *EightByteConstantSection_;
- const char *SixteenByteConstantSection;
- const Section *SixteenByteConstantSection_;
-
//===--- Global Variable Emission Directives --------------------------===//
/// GlobalDirective - This is the directive used to declare a global entity.
const char *const *AsmTransCBE; // Defaults to empty
public:
- TargetAsmInfo();
+ explicit TargetAsmInfo(const TargetMachine &TM);
virtual ~TargetAsmInfo();
const Section* getNamedSection(const char *Name,
const Section *getBSSSection_() const {
return BSSSection_;
}
- const char *getReadOnlySection() const {
+ const Section *getReadOnlySection() const {
return ReadOnlySection;
}
- const Section *getReadOnlySection_() const {
- return ReadOnlySection_;
- }
const Section *getSmallDataSection() const {
return SmallDataSection;
}
const char *getStaticDtorsSection() const {
return StaticDtorsSection;
}
- const char *getFourByteConstantSection() const {
- return FourByteConstantSection;
- }
- const Section *getFourByteConstantSection_() const {
- return FourByteConstantSection_;
- }
- const char *getEightByteConstantSection() const {
- return EightByteConstantSection;
- }
- const Section *getEightByteConstantSection_() const {
- return EightByteConstantSection_;
- }
- const char *getSixteenByteConstantSection() const {
- return SixteenByteConstantSection;
- }
- const Section *getSixteenByteConstantSection_() const {
- return SixteenByteConstantSection_;
- }
const char *getGlobalDirective() const {
return GlobalDirective;
}