[llvm-commits] [llvm] r76654 - in /llvm/trunk: include/llvm/Target/ELFTargetAsmInfo.h lib/Target/ELFTargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Tue Jul 21 14:29:08 PDT 2009
Author: lattner
Date: Tue Jul 21 16:29:08 2009
New Revision: 76654
URL: http://llvm.org/viewvc/llvm-project?rev=76654&view=rev
Log:
inline a trivial method into its only call site and fix indentation of cases
Modified:
llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h
llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h?rev=76654&r1=76653&r2=76654&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h Tue Jul 21 16:29:08 2009
@@ -28,7 +28,6 @@
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
virtual std::string printSectionFlags(unsigned flags) const;
- const Section* MergeableConstSection(const GlobalVariable *GV) const;
const Section* MergeableConstSection(const Type *Ty) const;
const Section* MergeableStringSection(const GlobalVariable *GV) const;
virtual const Section*
Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=76654&r1=76653&r2=76654&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Tue Jul 21 16:29:08 2009
@@ -97,34 +97,34 @@
return getNamedSection(Name.c_str(), Flags);
} else {
switch (Kind) {
- case SectionKind::Data:
- case SectionKind::SmallData:
+ case SectionKind::Data:
+ case SectionKind::SmallData:
return DataSection;
- case SectionKind::DataRel:
+ case SectionKind::DataRel:
return DataRelSection;
- case SectionKind::DataRelLocal:
+ case SectionKind::DataRelLocal:
return DataRelLocalSection;
- case SectionKind::DataRelRO:
+ case SectionKind::DataRelRO:
return DataRelROSection;
- case SectionKind::DataRelROLocal:
+ case SectionKind::DataRelROLocal:
return DataRelROLocalSection;
- case SectionKind::BSS:
- case SectionKind::SmallBSS:
+ case SectionKind::BSS:
+ case SectionKind::SmallBSS:
// ELF targets usually have BSS sections
return getBSSSection_();
- case SectionKind::ROData:
- case SectionKind::SmallROData:
+ case SectionKind::ROData:
+ case SectionKind::SmallROData:
return getReadOnlySection();
- case SectionKind::RODataMergeStr:
+ case SectionKind::RODataMergeStr:
return MergeableStringSection(GVar);
- case SectionKind::RODataMergeConst:
- return MergeableConstSection(GVar);
- case SectionKind::ThreadData:
+ case SectionKind::RODataMergeConst:
+ return MergeableConstSection(GVar->getInitializer()->getType());
+ case SectionKind::ThreadData:
// ELF targets usually support TLS stuff
return TLSDataSection;
- case SectionKind::ThreadBSS:
+ case SectionKind::ThreadBSS:
return TLSBSSSection;
- default:
+ default:
llvm_unreachable("Unsuported section kind for global");
}
}
@@ -141,11 +141,6 @@
}
const Section*
-ELFTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
- return MergeableConstSection(GV->getInitializer()->getType());
-}
-
-const Section*
ELFTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
const TargetData *TD = TM.getTargetData();
More information about the llvm-commits
mailing list