From 97ee12755d810b0a8c87a8fe10d73a938b33be88 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 Jul 2009 22:36:53 +0000 Subject: [PATCH] remove the Xcore implementation of SelectSectionForGlobal. While you have to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76664 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/XCore/XCoreTargetAsmInfo.cpp | 21 --------------------- lib/Target/XCore/XCoreTargetAsmInfo.h | 1 - 2 files changed, 22 deletions(-) diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/lib/Target/XCore/XCoreTargetAsmInfo.cpp index 6c613ef1665..cf27a51d281 100644 --- a/lib/Target/XCore/XCoreTargetAsmInfo.cpp +++ b/lib/Target/XCore/XCoreTargetAsmInfo.cpp @@ -68,27 +68,6 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM) DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits"; } -const Section* -XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { - SectionKind::Kind Kind = SectionKindForGlobal(GV); - - if (const GlobalVariable *GVar = dyn_cast(GV)) { - if (!GVar->isWeakForLinker()) { - switch (Kind) { - case SectionKind::RODataMergeConst: - return getReadOnlySection(); - case SectionKind::ThreadData: - return DataSection; - case SectionKind::ThreadBSS: - return getBSSSection_(); - default: - break; - } - } - } - return ELFTargetAsmInfo::SelectSectionForGlobal(GV); -} - unsigned XCoreTargetAsmInfo:: SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const { unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name); diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.h b/lib/Target/XCore/XCoreTargetAsmInfo.h index 3582effa901..c59c96e4d85 100644 --- a/lib/Target/XCore/XCoreTargetAsmInfo.h +++ b/lib/Target/XCore/XCoreTargetAsmInfo.h @@ -28,7 +28,6 @@ namespace llvm { public: explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM); - virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV = NULL, const char* name = NULL) const; -- 2.34.1