@@ -4171,18 +4171,18 @@ Status GDBRemoteCommunicationClient::SendSignalsToIgnore(
4171
4171
}
4172
4172
4173
4173
Status GDBRemoteCommunicationClient::ConfigureRemoteStructuredData (
4174
- ConstString type_name, const StructuredData::ObjectSP &config_sp) {
4174
+ llvm::StringRef type_name, const StructuredData::ObjectSP &config_sp) {
4175
4175
Status error;
4176
4176
4177
- if (type_name.GetLength () == 0 ) {
4177
+ if (type_name.empty () ) {
4178
4178
error.SetErrorString (" invalid type_name argument" );
4179
4179
return error;
4180
4180
}
4181
4181
4182
4182
// Build command: Configure{type_name}: serialized config data.
4183
4183
StreamGDBRemote stream;
4184
4184
stream.PutCString (" QConfigure" );
4185
- stream.PutCString (type_name. GetStringRef () );
4185
+ stream.PutCString (type_name);
4186
4186
stream.PutChar (' :' );
4187
4187
if (config_sp) {
4188
4188
// Gather the plain-text version of the configuration data.
@@ -4201,21 +4201,20 @@ Status GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(
4201
4201
auto result = SendPacketAndWaitForResponse (stream.GetString (), response);
4202
4202
if (result == PacketResult::Success) {
4203
4203
// We failed if the config result comes back other than OK.
4204
- if (strcmp ( response.GetStringRef (). data (), " OK " ) == 0 ) {
4204
+ if (response.GetStringRef () == " OK " ) {
4205
4205
// Okay!
4206
4206
error.Clear ();
4207
4207
} else {
4208
- error.SetErrorStringWithFormat (" configuring StructuredData feature "
4209
- " %s failed with error %s" ,
4210
- type_name.AsCString (),
4211
- response.GetStringRef ().data ());
4208
+ error.SetErrorStringWithFormatv (
4209
+ " configuring StructuredData feature {0} failed with error {1}" ,
4210
+ type_name, response.GetStringRef ());
4212
4211
}
4213
4212
} else {
4214
4213
// Can we get more data here on the failure?
4215
- error.SetErrorStringWithFormat ( " configuring StructuredData feature %s "
4216
- " failed when sending packet: "
4217
- " PacketResult=%d " ,
4218
- type_name. AsCString () , (int )result);
4214
+ error.SetErrorStringWithFormatv (
4215
+ " configuring StructuredData feature {0} failed when sending packet: "
4216
+ " PacketResult={1} " ,
4217
+ type_name, (int )result);
4219
4218
}
4220
4219
return error;
4221
4220
}
0 commit comments