diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-02-27 23:27:54 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-02-27 23:27:54 +0000 |
commit | 2b1bc151cb3d274c5bd4bcae27986068f9e88942 (patch) | |
tree | c2177f1de82abc4e3a8588c80da701a63b456ad0 /include/clang/Basic/FileManager.h | |
parent | 9e229d2b0b2161ac4dd0ae832061915afd721b1d (diff) |
Honour 'use-external-names' in FileManager
Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/FileManager.h')
-rw-r--r-- | include/clang/Basic/FileManager.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index b5b7231e13..ddf78c86de 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -59,7 +59,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. + std::string Name; // Name of the file. off_t Size; // File size in bytes. time_t ModTime; // Modification time of file. const DirectoryEntry *Dir; // Directory file lives in. @@ -81,8 +81,7 @@ class FileEntry { public: FileEntry() - : Name(0), UniqueID(0, 0), IsNamedPipe(false), InPCH(false), - IsValid(false) + : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false) {} // FIXME: this is here to allow putting FileEntry in std::map. Once we have @@ -92,7 +91,7 @@ public: assert(!isValid() && "Cannot copy an initialized FileEntry"); } - const char *getName() const { return Name; } + const char *getName() const { return Name.c_str(); } bool isValid() const { return IsValid; } off_t getSize() const { return Size; } unsigned getUID() const { return UID; } |