mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-15 04:08:07 +00:00
eliminate a pointless switch stmt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30c4a3b9a8
commit
13b9251eb1
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user