mirror of
https://github.com/intel/llvm.git
synced 2026-02-09 01:52:26 +08:00
Fixed DoConnectRemote issues where ProcessKDP wasn't switched over to use the version that needed a StringRef as the URL, and also updated all virtual functions to say "override" to make sure this doesn't happen again.
llvm-svn: 288999
This commit is contained in:
@@ -221,7 +221,7 @@ bool ProcessKDP::GetHostArchitecture(ArchSpec &arch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
|
||||
Error ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
|
||||
Error error;
|
||||
|
||||
// Don't let any JIT happen when doing KDP as we can't allocate
|
||||
@@ -229,8 +229,8 @@ Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
|
||||
// already be handling exceptions
|
||||
SetCanJIT(false);
|
||||
|
||||
if (remote_url == NULL || remote_url[0] == '\0') {
|
||||
error.SetErrorStringWithFormat("invalid connection URL '%s'", remote_url);
|
||||
if (remote_url.empty()) {
|
||||
error.SetErrorStringWithFormat("empty connection URL");
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,8 @@ Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
|
||||
}
|
||||
} else {
|
||||
if (error.Success())
|
||||
error.SetErrorStringWithFormat("failed to connect to '%s'", remote_url);
|
||||
error.SetErrorStringWithFormat("failed to connect to '%s'",
|
||||
remote_url.str().c_str());
|
||||
}
|
||||
if (error.Fail())
|
||||
m_comm.Disconnect();
|
||||
|
||||
Reference in New Issue
Block a user