Skip to content

Commit 63a81fd

Browse files
author
Sasha Krassovsky
committed
Fix warnings in SIL
1 parent 037f168 commit 63a81fd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

include/swift/SIL/AbstractionPattern.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ class AbstractionPattern {
402402
case Kind::Tuple:
403403
return false;
404404
}
405+
llvm_unreachable("Unhandled AbstractionPatternKind in switch");
405406
}
406407

407408
CanGenericSignature getGenericSignature() const {

lib/SIL/SILPrinter.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,6 +2993,12 @@ void SILCoverageMap::dump() const {
29932993
}
29942994

29952995
#ifndef NDEBUG
2996+
// Disable the "for use only in debugger" warning.
2997+
#if SWIFT_COMPILER_IS_MSVC
2998+
#pragma warning(push)
2999+
#pragma warning(disable : 4996)
3000+
#endif
3001+
29963002
void SILDebugScope::dump(SourceManager &SM, llvm::raw_ostream &OS,
29973003
unsigned Indent) const {
29983004
OS << "{\n";
@@ -3026,6 +3032,10 @@ void SILDebugScope::dump(SILModule &Mod) const {
30263032
dump(Mod.getASTContext().SourceMgr);
30273033
}
30283034

3035+
#if SWIFT_COMPILER_IS_MSVC
3036+
#pragma warning(pop)
3037+
#endif
3038+
30293039
#endif
30303040

30313041
void SILSpecializeAttr::print(llvm::raw_ostream &OS) const {

0 commit comments

Comments
 (0)