[llvm-commits] [llvm] r76659 - in /llvm/trunk/lib/Target/XCore: XCoreTargetAsmInfo.cpp XCoreTargetAsmInfo.h
Chris Lattner
sabre at nondot.org
Tue Jul 21 15:25:52 PDT 2009
Author: lattner
Date: Tue Jul 21 17:25:52 2009
New Revision: 76659
URL: http://llvm.org/viewvc/llvm-project?rev=76659&view=rev
Log:
Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead. This will result in its mergable constant
sections getting named ".rodata.cst4" instead of ".cp.const4", but the
linker looks at the section flags, not the name of the section AFAICT.
Modified:
llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp
llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=76659&r1=76658&r2=76659&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Tue Jul 21 17:25:52 2009
@@ -89,23 +89,6 @@
return ELFTargetAsmInfo::SelectSectionForGlobal(GV);
}
-const Section*
-XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
- const TargetData *TD = TM.getTargetData();
-
- unsigned Size = TD->getTypeAllocSize(Ty);
- if (Size == 4 || Size == 8 || Size == 16) {
- std::string Name = ".cp.const" + utostr(Size);
-
- return getNamedSection(Name.c_str(),
- SectionFlags::setEntitySize(SectionFlags::Mergeable |
- SectionFlags::Small,
- Size));
- }
-
- return getReadOnlySection();
-}
-
unsigned XCoreTargetAsmInfo::
SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h?rev=76659&r1=76658&r2=76659&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.h Tue Jul 21 17:25:52 2009
@@ -29,7 +29,6 @@
explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM);
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
- const Section* MergeableConstSection(const Type *Ty) const;
virtual unsigned
SectionFlagsForGlobal(const GlobalValue *GV = NULL,
const char* name = NULL) const;
More information about the llvm-commits
mailing list