aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-08 20:43:12 +0000
committerChris Lattner <sabre@nondot.org>2009-08-08 20:43:12 +0000
commit5277b22687d3513dd29d5a9c8510cac740f933f6 (patch)
tree9e9e43f4b75db5fda4347245ebfac0fe152b1f27 /include
parent17421d81fdbc94dbd8b3549b095303baaf52e689 (diff)
downloadexternal_llvm-5277b22687d3513dd29d5a9c8510cac740f933f6.zip
external_llvm-5277b22687d3513dd29d5a9c8510cac740f933f6.tar.gz
external_llvm-5277b22687d3513dd29d5a9c8510cac740f933f6.tar.bz2
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
A TAI hook is appropriate in this case because this is just an asm syntax issue, not a semantic difference. TLOF should model the semantics of the section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetAsmInfo.h10
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h10
2 files changed, 17 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index 70d2112..92b9771 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -158,6 +158,11 @@ namespace llvm {
return NULL;
}
+ /// SunStyleELFSectionSwitchSyntax - This is true if this target uses "Sun
+ /// Style" syntax for section switching ("#alloc,#write" etc) instead of the
+ /// normal ELF syntax (,"a,w") in .section directives.
+ bool SunStyleELFSectionSwitchSyntax; // Defaults to false.
+
//===--- Alignment Information ----------------------------------------===//
/// AlignDirective - The directive used to emit round up to an alignment
@@ -326,6 +331,11 @@ namespace llvm {
return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
}
+
+ bool usesSunStyleELFSectionSwitchSyntax() const {
+ return SunStyleELFSectionSwitchSyntax;
+ }
+
// Accessors.
//
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index f8d3f6f..e517fd3 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -25,6 +25,7 @@ namespace llvm {
class GlobalValue;
class Mangler;
class TargetMachine;
+ class TargetAsmInfo;
class TargetLoweringObjectFile {
MCContext *Ctx;
@@ -172,7 +173,8 @@ public:
/// into a string that can be printed to the assembly file after the
/// ".section foo" part of a section directive.
virtual void getSectionFlagsAsString(SectionKind Kind,
- SmallVectorImpl<char> &Str) const {
+ SmallVectorImpl<char> &Str,
+ const TargetAsmInfo &TAI) const {
}
protected:
@@ -229,7 +231,8 @@ public:
Mangler *Mang, const TargetMachine &TM) const;
void getSectionFlagsAsString(SectionKind Kind,
- SmallVectorImpl<char> &Str) const;
+ SmallVectorImpl<char> &Str,
+ const TargetAsmInfo &TAI) const;
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
@@ -286,7 +289,8 @@ public:
Mangler *Mang, const TargetMachine &TM) const;
virtual void getSectionFlagsAsString(SectionKind Kind,
- SmallVectorImpl<char> &Str) const;
+ SmallVectorImpl<char> &Str,
+ const TargetAsmInfo &TAI) const;
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,