[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
```
This commit is contained in:
Alexandre Ganea 2025-04-11 13:08:49 -04:00
parent e1d91ba06d
commit 715c61e9a7
3 changed files with 6 additions and 0 deletions

View File

@ -722,6 +722,7 @@ bool DAP::HandleObject(const protocol::Message &M) {
case protocol::eResponseMessageNotStopped:
return "notStopped";
}
llvm_unreachable("unknown response message kind.");
}),
*resp->message);
}

View File

@ -284,6 +284,7 @@ bool fromJSON(const json::Value &Params, Message &PM, json::Path P) {
PM = std::move(evt);
return true;
}
llvm_unreachable("unhandled message type request.");
}
json::Value toJSON(const Message &M) {

View File

@ -69,6 +69,7 @@ json::Value toJSON(const ColumnType &T) {
case eColumnTypeTimestamp:
return "unixTimestampUTC";
}
llvm_unreachable("unhandled column type.");
}
json::Value toJSON(const ColumnDescriptor &CD) {
@ -95,6 +96,7 @@ json::Value toJSON(const ChecksumAlgorithm &CA) {
case eChecksumAlgorithmTimestamp:
return "timestamp";
}
llvm_unreachable("unhandled checksum algorithm.");
}
json::Value toJSON(const BreakpointModeApplicability &BMA) {
@ -108,6 +110,7 @@ json::Value toJSON(const BreakpointModeApplicability &BMA) {
case eBreakpointModeApplicabilityInstruction:
return "instruction";
}
llvm_unreachable("unhandled breakpoint mode applicability.");
}
json::Value toJSON(const BreakpointMode &BM) {
@ -200,6 +203,7 @@ static llvm::StringLiteral ToString(AdapterFeature feature) {
case eAdapterFeatureTerminateDebuggee:
return "supportTerminateDebuggee";
}
llvm_unreachable("unhandled adapter feature.");
}
json::Value toJSON(const Capabilities &C) {