From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/LineEditor/LineEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/LineEditor') 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); -- cgit v1.2.3