eliminate a pointless switch stmt.

llvm-svn: 77110
This commit is contained in:
Chris Lattner 2009-07-26 01:44:55 +00:00
parent 6a82e424d0
commit 3092b82255
1 changed files with 2 additions and 11 deletions

View File

@ -49,17 +49,8 @@ ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
const Section*
ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind) const {
if (const Function *F = dyn_cast<Function>(GV)) {
switch (F->getLinkage()) {
default: llvm_unreachable("Unknown linkage type!");
case Function::PrivateLinkage:
case Function::LinkerPrivateLinkage:
case Function::InternalLinkage:
case Function::DLLExportLinkage:
case Function::ExternalLinkage:
return TextSection;
}
}
if (isa<Function>(GV))
return TextSection;
const GlobalVariable *GVar = cast<GlobalVariable>(GV);
switch (Kind.getKind()) {