summaryrefslogtreecommitdiff
path: root/llvm/lib/LineEditor/LineEditor.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/LineEditor/LineEditor.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'llvm/lib/LineEditor/LineEditor.cpp')
-rw-r--r--llvm/lib/LineEditor/LineEditor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LineEditor/LineEditor.cpp b/llvm/lib/LineEditor/LineEditor.cpp
index 57e62bd64871e..1aa3476eb3573 100644
--- a/llvm/lib/LineEditor/LineEditor.cpp
+++ b/llvm/lib/LineEditor/LineEditor.cpp
@@ -24,7 +24,7 @@ std::string LineEditor::getDefaultHistoryPath(StringRef ProgName) {
SmallString<32> Path;
if (sys::path::home_directory(Path)) {
sys::path::append(Path, "." + ProgName + "-history");
- return Path.str();
+ return std::string(Path.str());
}
return std::string();
}
@@ -197,7 +197,7 @@ unsigned char ElCompletionFn(EditLine *EL, int ch) {
LineEditor::LineEditor(StringRef ProgName, StringRef HistoryPath, FILE *In,
FILE *Out, FILE *Err)
- : Prompt((ProgName + "> ").str()), HistoryPath(HistoryPath),
+ : Prompt((ProgName + "> ").str()), HistoryPath(std::string(HistoryPath)),
Data(new InternalData) {
if (HistoryPath.empty())
this->HistoryPath = getDefaultHistoryPath(ProgName);