From 13b9251eb1343eb4c93944f5d6838404c27a7273 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 26 Jul 2009 01:44:55 +0000 Subject: [PATCH] eliminate a pointless switch stmt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77110 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ELFTargetAsmInfo.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 510816fdfcc..da8ed73852b 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/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(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(GV)) + return TextSection; const GlobalVariable *GVar = cast(GV); switch (Kind.getKind()) { -- 2.34.1