Skip to content

Commit 9f8b91a

Browse files
authored
Merge pull request #7402 from hughbe/msvc-refresh
Get Swift compiling with MSVC again
2 parents 379652d + 762a5a0 commit 9f8b91a

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
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 {

lib/Serialization/ModuleFile.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,9 @@ TypeDecl *ModuleFile::lookupNestedType(Identifier name,
12741274
auto declOrOffset = Decls[entry.first - 1];
12751275
if (!declOrOffset.isComplete())
12761276
continue;
1277-
if (declOrOffset != parent)
1277+
1278+
Decl *decl = declOrOffset;
1279+
if (decl != parent)
12781280
continue;
12791281
return cast<TypeDecl>(getDecl(entry.second));
12801282
}

0 commit comments

Comments
 (0)