summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-21 22:42:37 +0000
committerChris Lattner <sabre@nondot.org>2009-07-21 22:42:37 +0000
commit0ecf7b6f4ae6a67da95b34cb2e1b548b482543eb (patch)
treee7ee56fcfb414b38614574b0442bdae1e128e6c8 /llvm
parentbf4bc25236aebc7e4b4d958aec983486826e7753 (diff)
downloadbcm5719-llvm-0ecf7b6f4ae6a67da95b34cb2e1b548b482543eb.tar.gz
bcm5719-llvm-0ecf7b6f4ae6a67da95b34cb2e1b548b482543eb.zip
remove the last bits of SectionFlagsForGlobal. There is some flag here that
depends on XS1A, but I think the ReadOnlySection is already set up for this and there is no testcase that this breaks. If this is really needed, we can add the appropriate parameterization to TargetAsmInfo in the future to support this. llvm-svn: 76667
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/XCore/XCoreTargetAsmInfo.cpp26
-rw-r--r--llvm/lib/Target/XCore/XCoreTargetAsmInfo.h6
2 files changed, 2 insertions, 30 deletions
diff --git a/llvm/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/llvm/lib/Target/XCore/XCoreTargetAsmInfo.cpp
index c08a9054c7a..07cee8fb6bb 100644
--- a/llvm/lib/Target/XCore/XCoreTargetAsmInfo.cpp
+++ b/llvm/lib/Target/XCore/XCoreTargetAsmInfo.cpp
@@ -22,15 +22,14 @@
using namespace llvm;
XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
- : ELFTargetAsmInfo(TM),
- Subtarget(TM.getSubtargetImpl()) {
+ : ELFTargetAsmInfo(TM) {
SupportsDebugInformation = true;
TextSection = getUnnamedSection("\t.text", SectionFlags::Code);
DataSection = getNamedSection("\t.dp.data", SectionFlags::Writeable |
SectionFlags::Small);
BSSSection_ = getNamedSection("\t.dp.bss", SectionFlags::Writeable |
SectionFlags::BSS | SectionFlags::Small);
- if (Subtarget->isXS1A()) {
+ if (TM.getSubtargetImpl()->isXS1A()) {
ReadOnlySection = getNamedSection("\t.dp.rodata", SectionFlags::None |
SectionFlags::Writeable |
SectionFlags::Small);
@@ -68,24 +67,3 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
}
-unsigned XCoreTargetAsmInfo::
-SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
- unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
-
- // Set CP / DP relative flags
- if (GV) {
- SectionKind::Kind Kind = SectionKindForGlobal(GV);
- switch (Kind) {
- case SectionKind::ROData:
- case SectionKind::RODataMergeStr:
- case SectionKind::SmallROData:
- if (Subtarget->isXS1A())
- Flags |= SectionFlags::Writeable;
- break;
- default:
- break;
- }
- }
-
- return Flags;
-}
diff --git a/llvm/lib/Target/XCore/XCoreTargetAsmInfo.h b/llvm/lib/Target/XCore/XCoreTargetAsmInfo.h
index c59c96e4d85..6d38340e2c0 100644
--- a/llvm/lib/Target/XCore/XCoreTargetAsmInfo.h
+++ b/llvm/lib/Target/XCore/XCoreTargetAsmInfo.h
@@ -23,14 +23,8 @@ namespace llvm {
class XCoreSubtarget;
class XCoreTargetAsmInfo : public ELFTargetAsmInfo {
- private:
- const XCoreSubtarget *Subtarget;
public:
explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM);
-
- virtual unsigned
- SectionFlagsForGlobal(const GlobalValue *GV = NULL,
- const char* name = NULL) const;
};
} // namespace llvm
OpenPOWER on IntegriCloud