summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-27 05:32:16 +0000
committerChris Lattner <sabre@nondot.org>2009-07-27 05:32:16 +0000
commit149465ea06451b9ec1881347b2dccd311ab32576 (patch)
tree67380d89f607e4f46c879187360723f98bca45ec /llvm/lib/Target/X86
parent4ead0b9e1cfe52925dd9a8fef2ea9845396947df (diff)
downloadbcm5719-llvm-149465ea06451b9ec1881347b2dccd311ab32576.tar.gz
bcm5719-llvm-149465ea06451b9ec1881347b2dccd311ab32576.zip
Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that. llvm-svn: 77184
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.cpp18
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.h4
3 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
index 1260cedfcda..90cbf8085a7 100644
--- a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
@@ -799,7 +799,7 @@ void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
if (C->isNullValue() && !GVar->hasSection() &&
// Don't put things that should go in the cstring section into "comm".
- !TheSection->hasFlag(SectionFlags::Strings)) {
+ !TheSection->getKind().isMergeableCString()) {
if (GVar->hasExternalLinkage()) {
if (const char *Directive = TAI->getZeroFillDirective()) {
O << "\t.globl " << name << '\n';
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index 802d04a6b3c..04de225a400 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -58,7 +58,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
// FIXME: Why don't we always use this section?
if (is64Bit)
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
- SectionFlags::Mergeable);
+ SectionKind::MergeableConst16);
LCOMMDirective = "\t.lcomm\t";
// Leopard and above support aligned common symbols.
@@ -128,8 +128,7 @@ X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM):
// Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
- BSSSection_ = getUnnamedSection("\t.bss",
- SectionFlags::Writable | SectionFlags::BSS);
+ BSSSection_ = getUnnamedSection("\t.bss", SectionKind::BSS);
// Debug Information
AbsoluteDebugSectionOffsets = true;
@@ -278,13 +277,14 @@ getSectionPrefixForUniqueGlobal(SectionKind Kind) const {
}
-void X86COFFTargetAsmInfo::getSectionFlags(unsigned Flags,
- SmallVectorImpl<char> &Str) const {
+
+void X86COFFTargetAsmInfo::getSectionFlagsAsString(SectionKind Kind,
+ SmallVectorImpl<char> &Str) const {
// FIXME: Inefficient.
std::string Res = ",\"";
- if (Flags & SectionFlags::Code)
+ if (Kind.isText())
Res += 'x';
- if (Flags & SectionFlags::Writable)
+ if (Kind.isWriteable())
Res += 'w';
Res += "\"";
@@ -314,8 +314,8 @@ X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM):
AlignmentIsInBytes = true;
- TextSection = getUnnamedSection("_text", SectionFlags::Code);
- DataSection = getUnnamedSection("_data", SectionFlags::Writable);
+ TextSection = getUnnamedSection("_text", SectionKind::Text);
+ DataSection = getUnnamedSection("_data", SectionKind::DataRel);
JumpTableDataSection = NULL;
SwitchToSectionDirective = "";
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.h b/llvm/lib/Target/X86/X86TargetAsmInfo.h
index 75cd04c51d8..d9716809767 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.h
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.h
@@ -56,8 +56,8 @@ namespace llvm {
virtual const char *
getSectionPrefixForUniqueGlobal(SectionKind kind) const;
- virtual void getSectionFlags(unsigned Flags,
- SmallVectorImpl<char> &Str) const;
+ virtual void getSectionFlagsAsString(SectionKind Kind,
+ SmallVectorImpl<char> &Str) const;
};
struct X86WinTargetAsmInfo : public X86GenericTargetAsmInfo {
OpenPOWER on IntegriCloud