diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-21 09:50:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-21 09:50:16 +0000 |
commit | f69a1f319bd3c846c4a9ab84ea615e4e37dfd359 (patch) | |
tree | 240fab8ba8065f2749dbfa5877aa2726cc5c2b80 /include/clang/Basic/FileManager.h | |
parent | 41f5e66d44ae1142df82f40d4445c4a5710fa423 (diff) |
change the various getFile routines to use StringRef as their implementation form.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/FileManager.h')
-rw-r--r-- | include/clang/Basic/FileManager.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index 44a7079edd..05a3413312 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -197,22 +197,24 @@ public: /// returns null if the directory doesn't exist. /// const DirectoryEntry *getDirectory(llvm::StringRef Filename, + const FileSystemOptions &FileSystemOpts); + const DirectoryEntry *getDirectory(const char *FileStart,const char *FileEnd, const FileSystemOptions &FileSystemOpts) { - return getDirectory(Filename.begin(), Filename.end(), FileSystemOpts); + return getDirectory(llvm::StringRef(FileStart, FileEnd-FileStart), + FileSystemOpts); } - const DirectoryEntry *getDirectory(const char *FileStart,const char *FileEnd, - const FileSystemOptions &FileSystemOpts); /// getFile - Lookup, cache, and verify the specified file. This returns null /// if the file doesn't exist. /// const FileEntry *getFile(llvm::StringRef Filename, - const FileSystemOptions &FileSystemOpts) { - return getFile(Filename.begin(), Filename.end(), FileSystemOpts); - } + const FileSystemOptions &FileSystemOpts); const FileEntry *getFile(const char *FilenameStart, const char *FilenameEnd, - const FileSystemOptions &FileSystemOpts); + const FileSystemOptions &FileSystemOpts) { + return getFile(llvm::StringRef(FilenameStart, FilenameEnd-FilenameStart), + FileSystemOpts); + } /// \brief Retrieve a file entry for a "virtual" file that acts as /// if there were a file with the given name on disk. The file |