From f8f5bbe006bc98e98fd939898ceff08dbaace34f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 28 Aug 2018 09:07:14 -0700 Subject: Removed ToString method from tensorflow::StringPiece. This will make it easier to replace tensorflow::StringPiece with absl::string_view, as absl::string_view does not contain a ToString method. PiperOrigin-RevId: 210550029 --- tensorflow/stream_executor/dso_loader.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tensorflow/stream_executor') diff --git a/tensorflow/stream_executor/dso_loader.cc b/tensorflow/stream_executor/dso_loader.cc index 114143b3ab..ea5dffd15e 100644 --- a/tensorflow/stream_executor/dso_loader.cc +++ b/tensorflow/stream_executor/dso_loader.cc @@ -121,7 +121,7 @@ static mutex& GetRpathMutex() { /* static */ void DsoLoader::RegisterRpath(port::StringPiece path) { mutex_lock lock{GetRpathMutex()}; - GetRpaths()->push_back(path.ToString()); + GetRpaths()->emplace_back(path); } /* static */ port::Status DsoLoader::GetDsoHandle(port::StringPiece path, @@ -131,7 +131,7 @@ static mutex& GetRpathMutex() { return port::Status(port::error::INVALID_ARGUMENT, "Only LoadKind::kLocal is currently supported"); } - string path_string = path.ToString(); + string path_string(path); port::Status s = port::Env::Default()->LoadLibrary(path_string.c_str(), dso_handle); if (!s.ok()) { @@ -154,7 +154,7 @@ static mutex& GetRpathMutex() { /* static */ string DsoLoader::GetBinaryDirectory(bool strip_executable_name) { string exe_path = port::Env::Default()->GetExecutablePath(); - return strip_executable_name ? port::Dirname(exe_path).ToString() : exe_path; + return strip_executable_name ? string(port::Dirname(exe_path)) : exe_path; } // Creates a heap-allocated vector for initial rpaths. @@ -212,7 +212,7 @@ static std::vector* CreatePrimordialRpaths() { } attempted.push_back(candidate); - return library_name.ToString(); + return string(library_name); } /* static */ string DsoLoader::GetCudaLibraryDirPath() { -- cgit v1.2.3