Fixed a 'not all control paths return a value' warning on MSVC builds

llvm-svn: 280917
This commit is contained in:
Simon Pilgrim 2016-09-08 09:59:58 +00:00
parent 9fc6143a5b
commit 48c32b1504
1 changed files with 22 additions and 19 deletions

View File

@ -529,6 +529,9 @@ llvm::Constant *CodeGenVTables::CreateVTableComponent(
};
switch (Component.getKind()) {
default:
llvm_unreachable("Unexpected vtable component kind");
case VTableComponent::CK_VCallOffset:
return OffsetConstant(Component.getVCallOffset());