Skip to content

Get Swift compiling with MSVC again #7402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/swift/SIL/SILFunctionConventions.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ inline bool SILModuleConventions::isIndirectSILResult(SILResultInfo result,
case ResultConvention::Autoreleased:
return false;
}

llvm_unreachable("Unhandled ResultConvention in switch.");
}

inline SILType SILModuleConventions::getSILParamType(SILParameterInfo param,
Expand Down
2 changes: 2 additions & 0 deletions lib/IDE/CodeCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,8 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
case DeclContextKind::TopLevelCodeDecl:
return typeCheckTopLevelCodeDecl(cast<TopLevelCodeDecl>(DC));
}

llvm_unreachable("Unhandled DeclContextKind in switch.");
}

/// \returns true on success, false on failure.
Expand Down
2 changes: 2 additions & 0 deletions lib/SILGen/Cleanup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ llvm::raw_ostream &Lowering::operator<<(llvm::raw_ostream &os,
case CleanupState::PersistentlyActive:
return os << "PersistentlyActive";
}

llvm_unreachable("Unhandled CleanupState in switch.");
}

void CleanupManager::dump() const {
Expand Down
4 changes: 3 additions & 1 deletion lib/Serialization/ModuleFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,9 @@ TypeDecl *ModuleFile::lookupNestedType(Identifier name,
auto declOrOffset = Decls[entry.first - 1];
if (!declOrOffset.isComplete())
continue;
if (declOrOffset != parent)

Decl *decl = declOrOffset;
if (decl != parent)
continue;
return cast<TypeDecl>(getDecl(entry.second));
}
Expand Down