aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-24 15:49:58 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-24 15:49:58 +0000
commit1b2c3c0884e917ae5d59edde7d93b2af33c6a1b6 (patch)
tree01b69b191e30f34a67de28c7e000ea38a1428245 /lib/Serialization/ASTWriter.cpp
parent5f3d8224af99ad0d9107601c0c31b74693371cc1 (diff)
(De-)serialize the file system options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r--lib/Serialization/ASTWriter.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index 650d1aa3c5..befb74dbf3 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -777,7 +777,8 @@ void ASTWriter::WriteBlockInfoBlock() {
RECORD(ORIGINAL_PCH_DIR);
RECORD(INPUT_FILE_OFFSETS);
RECORD(DIAGNOSTIC_OPTIONS);
-
+ RECORD(FILE_SYSTEM_OPTIONS);
+
BLOCK(INPUT_FILES_BLOCK);
RECORD(INPUT_FILE);
@@ -1084,6 +1085,13 @@ void ASTWriter::WriteControlBlock(ASTContext &Context, StringRef isysroot,
// are generally transient files and will almost always be overridden.
Stream.EmitRecord(DIAGNOSTIC_OPTIONS, Record);
+ // File system options.
+ Record.clear();
+ const FileSystemOptions &FSOpts
+ = Context.getSourceManager().getFileManager().getFileSystemOptions();
+ AddString(FSOpts.WorkingDir, Record);
+ Stream.EmitRecord(FILE_SYSTEM_OPTIONS, Record);
+
// Original file name and file ID
SourceManager &SM = Context.getSourceManager();
if (const FileEntry *MainFile = SM.getFileEntryForID(SM.getMainFileID())) {