aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LineEditor/LineEditor.cpp
diff options
context:
space:
mode:
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 57e62bd64871..1aa3476eb357 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);