aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
-rw-r--r--llvm/lib/Support/GraphWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp
index c689a81..214a903 100644
--- a/llvm/lib/Support/GraphWriter.cpp
+++ b/llvm/lib/Support/GraphWriter.cpp
@@ -86,7 +86,7 @@ std::string llvm::createGraphFilename(const Twine &Name, int &FD) {
}
errs() << "Writing '" << Filename << "'... ";
- return Filename.str();
+ return std::string(Filename.str());
}
// Execute the graph viewer. Return true if there were errors.
@@ -147,7 +147,7 @@ static const char *getProgramName(GraphProgram::Name program) {
bool llvm::DisplayGraph(StringRef FilenameRef, bool wait,
GraphProgram::Name program) {
- std::string Filename = FilenameRef;
+ std::string Filename = std::string(FilenameRef);
std::string ErrMsg;
std::string ViewerPath;
GraphSession S;