diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index da8c76e06800..8d1206d9f4b1 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -529,9 +529,6 @@ llvm::Constant *CodeGenVTables::CreateVTableComponent( }; switch (Component.getKind()) { - default: - llvm_unreachable("Unexpected vtable component kind"); - case VTableComponent::CK_VCallOffset: return OffsetConstant(Component.getVCallOffset()); @@ -619,6 +616,8 @@ llvm::Constant *CodeGenVTables::CreateVTableComponent( case VTableComponent::CK_UnusedFunctionPointer: return llvm::ConstantExpr::getNullValue(CGM.Int8PtrTy); } + + llvm_unreachable("Unexpected vtable component kind"); } llvm::Constant *