aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-28 09:07:14 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-28 09:11:17 -0700
commitf8f5bbe006bc98e98fd939898ceff08dbaace34f (patch)
tree0ce731cb888e678790f69923788decfb58a7a9cb /tensorflow/stream_executor
parent2cb954e5441605c8668d2aecbf12e324a07b3c89 (diff)
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
Diffstat (limited to 'tensorflow/stream_executor')
-rw-r--r--tensorflow/stream_executor/dso_loader.cc8
1 files changed, 4 insertions, 4 deletions
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<string>* CreatePrimordialRpaths() {
}
attempted.push_back(candidate);
- return library_name.ToString();
+ return string(library_name);
}
/* static */ string DsoLoader::GetCudaLibraryDirPath() {