File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class OutputInfo {
114114 // / (If empty, this implies no SDK.)
115115 std::string SDKPath;
116116
117- enum SanitizerKind SelectedSanitizer;
117+ SanitizerKind SelectedSanitizer;
118118};
119119
120120class Driver {
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ inline static StringRef getName(TopLevelKey Key) {
4444 case TopLevelKey::BuildTime: return " build_time" ;
4545 case TopLevelKey::Inputs: return " inputs" ;
4646 }
47+
48+ // Work around MSVC warning: not all control paths return a value
49+ llvm_unreachable (" All switch cases are covered" );
4750}
4851
4952// / \returns The string identifier used to represent the given status in a
@@ -64,6 +67,9 @@ getIdentifierForInputInfoStatus(CompileJobAction::InputInfo::Status Status) {
6467 case CompileJobAction::InputInfo::NeedsNonCascadingBuild:
6568 return " !private" ;
6669 }
70+
71+ // Work around MSVC warning: not all control paths return a value
72+ llvm_unreachable (" All switch cases are covered" );
6773}
6874
6975// / \returns The status corresponding to the string identifier used in a
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ using namespace swift;
3131using namespace swift ::driver;
3232using namespace llvm ::opt;
3333
34- const char * const ToolChain::SWIFT_EXECUTABLE_NAME;
35-
3634ToolChain::JobContext::JobContext (Compilation &C,
3735 ArrayRef<const Job *> Inputs,
3836 ArrayRef<const Action *> InputActions,
@@ -91,6 +89,9 @@ ToolChain::constructJob(const JobAction &JA,
9189 case Action::Input:
9290 llvm_unreachable (" not a JobAction" );
9391 }
92+
93+ // Work around MSVC warning: not all control paths return a value
94+ llvm_unreachable (" All switch cases are covered" );
9495 }();
9596
9697 // Special-case the Swift frontend.
Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ bool types::isTextual(ID Id) {
9292 case types::TY_INVALID:
9393 llvm_unreachable (" Invalid type ID." );
9494 }
95+
96+ // Work around MSVC warning: not all control paths return a value
97+ llvm_unreachable (" All switch cases are covered" );
9598}
9699
97100bool types::isAfterLLVM (ID Id) {
@@ -122,6 +125,9 @@ bool types::isAfterLLVM(ID Id) {
122125 case types::TY_INVALID:
123126 llvm_unreachable (" Invalid type ID." );
124127 }
128+
129+ // Work around MSVC warning: not all control paths return a value
130+ llvm_unreachable (" All switch cases are covered" );
125131}
126132
127133bool types::isPartOfSwiftCompilation (ID Id) {
@@ -152,4 +158,7 @@ bool types::isPartOfSwiftCompilation(ID Id) {
152158 case types::TY_INVALID:
153159 llvm_unreachable (" Invalid type ID." );
154160 }
161+
162+ // Work around MSVC warning: not all control paths return a value
163+ llvm_unreachable (" All switch cases are covered" );
155164}
You can’t perform that action at this time.
0 commit comments