FreeBSDThread::GetRegisterContext is only for FreeBSD targets

The removal of in-process Linux debug support left a switch statement
with llvm::Triple::FreeBSD as the only case. Simplify by replacing it
with a now-equivalent assertion.

llvm-svn: 243468
This commit is contained in:
Ed Maste 2015-07-28 19:47:00 +00:00
parent a32fa81c09
commit a43ce0dc98
1 changed files with 20 additions and 29 deletions

View File

@ -157,9 +157,7 @@ FreeBSDThread::GetRegisterContext()
RegisterInfoInterface *reg_interface = NULL;
const ArchSpec &target_arch = GetProcess()->GetTarget().GetArchitecture();
switch (target_arch.GetTriple().getOS())
{
case llvm::Triple::FreeBSD:
assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD);
switch (target_arch.GetMachine())
{
case llvm::Triple::arm:
@ -183,15 +181,8 @@ FreeBSDThread::GetRegisterContext()
reg_interface = new RegisterContextFreeBSD_x86_64(target_arch);
break;
default:
break;
llvm_unreachable("CPU not supported");
}
break;
default:
break;
}
assert(reg_interface && "OS or CPU not supported!");
switch (target_arch.GetMachine())
{