diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 01:44:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 01:44:55 +0000 |
commit | 3092b822552965efa5c13103d1ed5bce8774682b (patch) | |
tree | b92a6743b9768099f2a3754f95627a499fe1e55a /llvm/lib | |
parent | 6a82e424d008052fe891bb69e4da239403af4ab6 (diff) | |
download | bcm5719-llvm-3092b822552965efa5c13103d1ed5bce8774682b.tar.gz bcm5719-llvm-3092b822552965efa5c13103d1ed5bce8774682b.zip |
eliminate a pointless switch stmt.
llvm-svn: 77110
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ELFTargetAsmInfo.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/Target/ELFTargetAsmInfo.cpp b/llvm/lib/Target/ELFTargetAsmInfo.cpp index 510816fdfcc..da8ed73852b 100644 --- a/llvm/lib/Target/ELFTargetAsmInfo.cpp +++ b/llvm/lib/Target/ELFTargetAsmInfo.cpp @@ -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()) { |