]> granicus.if.org Git - clang/commitdiff
Make FileManager::getFileSystemOptions consistent with CompilerInstance::getFileSyste...
authorYaron Keren <yaron.keren@gmail.com>
Wed, 26 Aug 2015 08:10:22 +0000 (08:10 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Wed, 26 Aug 2015 08:10:22 +0000 (08:10 +0000)
and CompilerInvocation::getFileSystemOpts by renaming it to getFileSystemOpts,
marking the const-returning access method const and adding a non-const version,
making the function prototypes identical to CompilerInstance::getFileSystemOpts.

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

include/clang/Basic/FileManager.h
lib/Serialization/ASTWriter.cpp

index 219422b9c73d77ed56ae1173c8161e7c2d1e07ac..c76da25dd54780e16c9223a7f11b47625104cf70 100644 (file)
@@ -218,7 +218,8 @@ public:
                            bool CacheFailure = true);
 
   /// \brief Returns the current file system options
-  const FileSystemOptions &getFileSystemOptions() { return FileSystemOpts; }
+  FileSystemOptions &getFileSystemOpts() { return FileSystemOpts; }
+  const FileSystemOptions &getFileSystemOpts() const { return FileSystemOpts; }
 
   IntrusiveRefCntPtr<vfs::FileSystem> getVirtualFileSystem() const {
     return FS;
index 7058ba3eb9b2a9d0fea64b94e4ebfa9b3a489650..9563b385e95d1933b6eb70e794ff9c2280f87f7b 100644 (file)
@@ -1326,8 +1326,8 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
 
   // File system options.
   Record.clear();
-  const FileSystemOptions &FSOpts
-    = Context.getSourceManager().getFileManager().getFileSystemOptions();
+  const FileSystemOptions &FSOpts =
+      Context.getSourceManager().getFileManager().getFileSystemOpts();
   AddString(FSOpts.WorkingDir, Record);
   Stream.EmitRecord(FILE_SYSTEM_OPTIONS, Record);