From 031d64683a108f3e4b71bca0d48f8ba2ba92688d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 1 Mar 2011 22:07:09 +0000 Subject: [PATCH] Change directory_entry::path() to return a const std::string & instead of a StringRef, for the benefit of clients that want the result as a nul-terminated string. Clients that expect a StringRef will get one via the implicit conversion. llvm-svn: 126784 --- llvm/include/llvm/Support/FileSystem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/Support/FileSystem.h b/llvm/include/llvm/Support/FileSystem.h index 4001bf0b84e3..4f013f89e86c 100644 --- a/llvm/include/llvm/Support/FileSystem.h +++ b/llvm/include/llvm/Support/FileSystem.h @@ -595,7 +595,7 @@ public: void replace_filename(const Twine &filename, file_status st = file_status(), file_status symlink_st = file_status()); - StringRef path() const { return Path; } + const std::string &path() const { return Path; } error_code status(file_status &result) const; error_code symlink_status(file_status &result) const;