Fix remote-linux regression due to stringRef changes
authorOmair Javaid <omair.javaid@linaro.org>
Mon, 21 Nov 2016 15:18:58 +0000 (15:18 +0000)
committerOmair Javaid <omair.javaid@linaro.org>
Mon, 21 Nov 2016 15:18:58 +0000 (15:18 +0000)
This is to fix a regression in remote-linux lldb-server connections.

We were wrongly passing a copy of uri and expecting a stringRef back.

llvm-svn: 287542

lldb/tools/lldb-server/Acceptor.cpp

index 3e59619..00a0bda 100644 (file)
@@ -90,7 +90,7 @@ std::unique_ptr<Acceptor> Acceptor::Create(StringRef name,
   int port;
   StringRef scheme, host, path;
   // Try to match socket name as URL - e.g., tcp://localhost:5555
-  if (UriParser::Parse(name.str(), scheme, host, port, path)) {
+  if (UriParser::Parse(name, scheme, host, port, path)) {
     if (!FindProtocolByScheme(scheme.str().c_str(), socket_protocol))
       error.SetErrorStringWithFormat("Unknown protocol scheme \"%s\"",
                                      scheme.str().c_str());