Skip to content

Commit 715c61e

Browse files
committed
[lldb][lldbp-dap] On Windoows, silence warnings when building with MSVC
Fixes: ``` [6373/7138] Building CXX object tools\lldb\tools\lldb-dap\CMakeFiles\lldb-dap.dir\DAP.cpp.obj C:\git\llvm-project\lldb\tools\lldb-dap\DAP.cpp(725) : warning C4715: '`lldb_dap::DAP::HandleObject'::`30'::<lambda_2>::operator()': not all control paths return a value [6421/7138] Building CXX object tools\lldb\tools\lldb-dap\CMakeFiles\lldb-dap.dir\Protocol\ProtocolTypes.cpp.obj C:\git\llvm-project\lldb\tools\lldb-dap\Protocol\ProtocolTypes.cpp(203) : warning C4715: 'lldb_dap::protocol::ToString': not all control paths return a value C:\git\llvm-project\lldb\tools\lldb-dap\Protocol\ProtocolTypes.cpp(98) : warning C4715: 'lldb_dap::protocol::toJSON': not all control paths return a value C:\git\llvm-project\lldb\tools\lldb-dap\Protocol\ProtocolTypes.cpp(72) : warning C4715: 'lldb_dap::protocol::toJSON': not all control paths return a value C:\git\llvm-project\lldb\tools\lldb-dap\Protocol\ProtocolTypes.cpp(111) : warning C4715: 'lldb_dap::protocol::toJSON': not all control paths return a value [6426/7138] Building CXX object tools\lldb\tools\lldb-dap\CMakeFiles\lldb-dap.dir\Protocol\ProtocolBase.cpp.obj C:\git\llvm-project\lldb\tools\lldb-dap\Protocol\ProtocolBase.cpp(287) : warning C4715: 'lldb_dap::protocol::fromJSON': not all control paths return a value ```
1 parent e1d91ba commit 715c61e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ bool DAP::HandleObject(const protocol::Message &M) {
722722
case protocol::eResponseMessageNotStopped:
723723
return "notStopped";
724724
}
725+
llvm_unreachable("unknown response message kind.");
725726
}),
726727
*resp->message);
727728
}

lldb/tools/lldb-dap/Protocol/ProtocolBase.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ bool fromJSON(const json::Value &Params, Message &PM, json::Path P) {
284284
PM = std::move(evt);
285285
return true;
286286
}
287+
llvm_unreachable("unhandled message type request.");
287288
}
288289

289290
json::Value toJSON(const Message &M) {

lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ json::Value toJSON(const ColumnType &T) {
6969
case eColumnTypeTimestamp:
7070
return "unixTimestampUTC";
7171
}
72+
llvm_unreachable("unhandled column type.");
7273
}
7374

7475
json::Value toJSON(const ColumnDescriptor &CD) {
@@ -95,6 +96,7 @@ json::Value toJSON(const ChecksumAlgorithm &CA) {
9596
case eChecksumAlgorithmTimestamp:
9697
return "timestamp";
9798
}
99+
llvm_unreachable("unhandled checksum algorithm.");
98100
}
99101

100102
json::Value toJSON(const BreakpointModeApplicability &BMA) {
@@ -108,6 +110,7 @@ json::Value toJSON(const BreakpointModeApplicability &BMA) {
108110
case eBreakpointModeApplicabilityInstruction:
109111
return "instruction";
110112
}
113+
llvm_unreachable("unhandled breakpoint mode applicability.");
111114
}
112115

113116
json::Value toJSON(const BreakpointMode &BM) {
@@ -200,6 +203,7 @@ static llvm::StringLiteral ToString(AdapterFeature feature) {
200203
case eAdapterFeatureTerminateDebuggee:
201204
return "supportTerminateDebuggee";
202205
}
206+
llvm_unreachable("unhandled adapter feature.");
203207
}
204208

205209
json::Value toJSON(const Capabilities &C) {

0 commit comments

Comments
 (0)