remove the last bits of SectionFlagsForGlobal. There is some flag here that
authorChris Lattner <sabre@nondot.org>
Tue, 21 Jul 2009 22:42:37 +0000 (22:42 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 21 Jul 2009 22:42:37 +0000 (22:42 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76667 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/XCore/XCoreTargetAsmInfo.cpp
lib/Target/XCore/XCoreTargetAsmInfo.h

index c08a9054c7a436c2eb23fe92c2405b90887c3395..07cee8fb6bb47b1ed985ad86ee4d46eff0cdbaa4 100644 (file)
 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;
-}
index c59c96e4d8502eec0b8b3315ea4e95128374117e..6d38340e2c05b477a57eaf53fce30a11d76dd410 100644 (file)
@@ -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