Skip to content

Commit 762a5a0

Browse files
committed
Add some llvm_unreachable annotations for recently introduced MSVC control path warnings
1 parent a2c0e30 commit 762a5a0

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

include/swift/SIL/SILFunctionConventions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ inline bool SILModuleConventions::isIndirectSILResult(SILResultInfo result,
357357
case ResultConvention::Autoreleased:
358358
return false;
359359
}
360+
361+
llvm_unreachable("Unhandled ResultConvention in switch.");
360362
}
361363

362364
inline SILType SILModuleConventions::getSILParamType(SILParameterInfo param,

lib/IDE/CodeCompletion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,8 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
13541354
case DeclContextKind::TopLevelCodeDecl:
13551355
return typeCheckTopLevelCodeDecl(cast<TopLevelCodeDecl>(DC));
13561356
}
1357+
1358+
llvm_unreachable("Unhandled DeclContextKind in switch.");
13571359
}
13581360

13591361
/// \returns true on success, false on failure.

lib/SILGen/Cleanup.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ llvm::raw_ostream &Lowering::operator<<(llvm::raw_ostream &os,
245245
case CleanupState::PersistentlyActive:
246246
return os << "PersistentlyActive";
247247
}
248+
249+
llvm_unreachable("Unhandled CleanupState in switch.");
248250
}
249251

250252
void CleanupManager::dump() const {

0 commit comments

Comments
 (0)