[llvm-commits] [llvm] r126784 - /llvm/trunk/include/llvm/Support/FileSystem.h

Dan Gohman gohman at apple.com
Tue Mar 1 14:07:09 PST 2011


Author: djg
Date: Tue Mar  1 16:07:09 2011
New Revision: 126784

URL: http://llvm.org/viewvc/llvm-project?rev=126784&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/Support/FileSystem.h

Modified: llvm/trunk/include/llvm/Support/FileSystem.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=126784&r1=126783&r2=126784&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FileSystem.h (original)
+++ llvm/trunk/include/llvm/Support/FileSystem.h Tue Mar  1 16:07:09 2011
@@ -595,7 +595,7 @@
   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;
 





More information about the llvm-commits mailing list