diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-01-19 02:09:44 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-01-19 02:09:44 +0000 |
| commit | 1d371882b6da32538d198004be1b272567b150a3 (patch) | |
| tree | d47549c7355b82b45fc88deac1208f457f218712 /llvm/include | |
| parent | 5e1a83c19672d57ad20a10bc415eb43572a21554 (diff) | |
| download | bcm5719-llvm-1d371882b6da32538d198004be1b272567b150a3.tar.gz bcm5719-llvm-1d371882b6da32538d198004be1b272567b150a3.zip | |
Cleanup handling of .zerofill on darwin:
1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.
llvm-svn: 93838
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/MC/MCAsmInfo.h | 13 | ||||
| -rw-r--r-- | llvm/include/llvm/Target/TargetLoweringObjectFile.h | 7 |
2 files changed, 12 insertions, 8 deletions
diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h index 1d90feb09b9..6d01278711f 100644 --- a/llvm/include/llvm/MC/MCAsmInfo.h +++ b/llvm/include/llvm/MC/MCAsmInfo.h @@ -29,15 +29,15 @@ namespace llvm { // Properties to be set by the target writer, used to configure asm printer. // - /// ZeroFillDirective - Directive for emitting a global to the ZeroFill - /// section on this target. Null if this target doesn't support zerofill. - const char *ZeroFillDirective; // Default is null. - /// NonexecutableStackDirective - Directive for declaring to the /// linker and beyond that the emitted code does not require stack /// memory to be executable. const char *NonexecutableStackDirective; // Default is null. + /// HasMachoZeroFillDirective - True if this is a MachO target that supports + /// the macho-specific .zerofill directive for emitting BSS Symbols. + bool HasMachoZeroFillDirective; // Default is false. + /// NeedsSet - True if target asm treats expressions in data directives /// as linktime-relocatable. For assembly-time computation, we need to /// use a .set. Thus: @@ -313,10 +313,7 @@ namespace llvm { // Accessors. // - const char *getZeroFillDirective() const { - return ZeroFillDirective; - } - bool hasZeroFillDirective() const { return ZeroFillDirective != 0; } + bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; } const char *getNonexecutableStackDirective() const { return NonexecutableStackDirective; diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h index 3dd747175b4..fec56fa442c 100644 --- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -258,6 +258,7 @@ class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { const MCSection *ConstDataCoalSection; const MCSection *ConstDataSection; const MCSection *DataCoalSection; + const MCSection *DataCommonSection; const MCSection *FourByteConstantSection; const MCSection *EightByteConstantSection; const MCSection *SixteenByteConstantSection; @@ -312,6 +313,12 @@ public: return ConstTextCoalSection; } + /// getDataCommonSection - Return the "__DATA,__common" section we put + /// zerofill (aka bss) data into. + const MCSection *getDataCommonSection() const { + return DataCommonSection; + } + /// getLazySymbolPointerSection - Return the section corresponding to /// the .lazy_symbol_pointer directive. const MCSection *getLazySymbolPointerSection() const { |

