diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-10 22:52:47 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-10 22:52:47 +0000 |
commit | 8bd553fc8d3074d54421845a80ea5ccc3a4c44a9 (patch) | |
tree | 997d123ec176455f52c46a2bd3b8b0789173a7ff /include/clang/Basic/FileManager.h | |
parent | 24a15d69fc8bff2dd1c53bd4ecf59b5b931326d2 (diff) |
Store FileEntry::Filename as a StringRef instead of raw pointer (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/FileManager.h')
-rw-r--r-- | include/clang/Basic/FileManager.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index b6a9ca7028..d16543ff83 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -51,7 +51,7 @@ public: /// If the 'File' member is valid, then this FileEntry has an open file /// descriptor for the file. class FileEntry { - const char *Name; // Name of the file. + StringRef Name; // Name of the file. std::string RealPathName; // Real path to the file; could be empty. off_t Size; // File size in bytes. time_t ModTime; // Modification time of file. @@ -82,7 +82,7 @@ public: assert(!isValid() && "Cannot copy an initialized FileEntry"); } - const char *getName() const { return Name; } + StringRef getName() const { return Name; } StringRef tryGetRealPathName() const { return RealPathName; } bool isValid() const { return IsValid; } off_t getSize() const { return Size; } |