Change directory_entry::path() to return a const std::string & instead of
authorDan Gohman <gohman@apple.com>
Tue, 1 Mar 2011 22:07:09 +0000 (22:07 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 1 Mar 2011 22:07:09 +0000 (22:07 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126784 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/FileSystem.h

index 4001bf0b84e3be730ec08b43aa6677896454a715..4f013f89e86c4db7e7c23665bd28702d80325df5 100644 (file)
@@ -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;