mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 20:04:03 +00:00
inline a trivial method into its only call site and fix indentation of cases
llvm-svn: 76654
This commit is contained in:
parent
4815d4919c
commit
8d061f011b
@ -28,7 +28,6 @@ namespace llvm {
|
|||||||
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
|
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
|
||||||
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
|
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
|
||||||
virtual std::string printSectionFlags(unsigned flags) const;
|
virtual std::string printSectionFlags(unsigned flags) const;
|
||||||
const Section* MergeableConstSection(const GlobalVariable *GV) const;
|
|
||||||
const Section* MergeableConstSection(const Type *Ty) const;
|
const Section* MergeableConstSection(const Type *Ty) const;
|
||||||
const Section* MergeableStringSection(const GlobalVariable *GV) const;
|
const Section* MergeableStringSection(const GlobalVariable *GV) const;
|
||||||
virtual const Section*
|
virtual const Section*
|
||||||
|
@ -97,34 +97,34 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
|
|||||||
return getNamedSection(Name.c_str(), Flags);
|
return getNamedSection(Name.c_str(), Flags);
|
||||||
} else {
|
} else {
|
||||||
switch (Kind) {
|
switch (Kind) {
|
||||||
case SectionKind::Data:
|
case SectionKind::Data:
|
||||||
case SectionKind::SmallData:
|
case SectionKind::SmallData:
|
||||||
return DataSection;
|
return DataSection;
|
||||||
case SectionKind::DataRel:
|
case SectionKind::DataRel:
|
||||||
return DataRelSection;
|
return DataRelSection;
|
||||||
case SectionKind::DataRelLocal:
|
case SectionKind::DataRelLocal:
|
||||||
return DataRelLocalSection;
|
return DataRelLocalSection;
|
||||||
case SectionKind::DataRelRO:
|
case SectionKind::DataRelRO:
|
||||||
return DataRelROSection;
|
return DataRelROSection;
|
||||||
case SectionKind::DataRelROLocal:
|
case SectionKind::DataRelROLocal:
|
||||||
return DataRelROLocalSection;
|
return DataRelROLocalSection;
|
||||||
case SectionKind::BSS:
|
case SectionKind::BSS:
|
||||||
case SectionKind::SmallBSS:
|
case SectionKind::SmallBSS:
|
||||||
// ELF targets usually have BSS sections
|
// ELF targets usually have BSS sections
|
||||||
return getBSSSection_();
|
return getBSSSection_();
|
||||||
case SectionKind::ROData:
|
case SectionKind::ROData:
|
||||||
case SectionKind::SmallROData:
|
case SectionKind::SmallROData:
|
||||||
return getReadOnlySection();
|
return getReadOnlySection();
|
||||||
case SectionKind::RODataMergeStr:
|
case SectionKind::RODataMergeStr:
|
||||||
return MergeableStringSection(GVar);
|
return MergeableStringSection(GVar);
|
||||||
case SectionKind::RODataMergeConst:
|
case SectionKind::RODataMergeConst:
|
||||||
return MergeableConstSection(GVar);
|
return MergeableConstSection(GVar->getInitializer()->getType());
|
||||||
case SectionKind::ThreadData:
|
case SectionKind::ThreadData:
|
||||||
// ELF targets usually support TLS stuff
|
// ELF targets usually support TLS stuff
|
||||||
return TLSDataSection;
|
return TLSDataSection;
|
||||||
case SectionKind::ThreadBSS:
|
case SectionKind::ThreadBSS:
|
||||||
return TLSBSSSection;
|
return TLSBSSSection;
|
||||||
default:
|
default:
|
||||||
llvm_unreachable("Unsuported section kind for global");
|
llvm_unreachable("Unsuported section kind for global");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,11 +140,6 @@ ELFTargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const {
|
|||||||
return MergeableConstSection(Ty);
|
return MergeableConstSection(Ty);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Section*
|
|
||||||
ELFTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
|
|
||||||
return MergeableConstSection(GV->getInitializer()->getType());
|
|
||||||
}
|
|
||||||
|
|
||||||
const Section*
|
const Section*
|
||||||
ELFTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
|
ELFTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
|
||||||
const TargetData *TD = TM.getTargetData();
|
const TargetData *TD = TM.getTargetData();
|
||||||
|
Loading…
Reference in New Issue
Block a user