Moved llvm_unreachable out of switch blocks to avoid the "control reaches end of non-void function" warning.

llvm-svn: 179590
This commit is contained in:
Andy Gibbs 2013-04-16 11:52:34 +00:00
parent 209095cd9f
commit bab932b850
2 changed files with 6 additions and 3 deletions

View File

@ -125,9 +125,10 @@ bool UniversalDriver::link(int argc, const char *argv[],
case Flavor::core:
return CoreDriver::link(args.size(), args.data(), diagnostics);
case Flavor::win_link:
llvm_unreachable("Unsupported flavor");
break;
case Flavor::invalid:
return true;
}
llvm_unreachable("Unsupported flavor");
}
} // end namespace lld

View File

@ -111,8 +111,9 @@ uint32_t MachOTargetInfo::getCPUType() const {
case MachOTargetInfo::arch_armv7s:
return mach_o::CPU_TYPE_ARM;
case MachOTargetInfo::arch_unknown:
llvm_unreachable("Unknown arch type");
break;
}
llvm_unreachable("Unknown arch type");
}
uint32_t MachOTargetInfo::getCPUSubType() const {
@ -128,8 +129,9 @@ uint32_t MachOTargetInfo::getCPUSubType() const {
case MachOTargetInfo::arch_armv7s:
return mach_o::CPU_SUBTYPE_ARM_V7S;
case MachOTargetInfo::arch_unknown:
llvm_unreachable("Unknown arch type");
break;
}
llvm_unreachable("Unknown arch type");
}