diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-03 21:50:39 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-03 21:50:39 +0000 |
commit | 6eec06d0d4fa2e108546b422619c6cb32f234e6e (patch) | |
tree | 90747a8a081ee31c93799c847f17b5625c9b9f80 /clang/lib/Basic/FileManager.cpp | |
parent | 2e7f638b23788c0efc611cc68ca7747c0ad9afed (diff) | |
download | bcm5719-llvm-6eec06d0d4fa2e108546b422619c6cb32f234e6e.tar.gz bcm5719-llvm-6eec06d0d4fa2e108546b422619c6cb32f234e6e.zip |
[PCH] When validating that the files coming from PCH did not change, also
validate that we didn't override the contents of any of such files.
If this is detected, emit a diagnostic error and recover gracefully
by using the contents of the original file that the PCH was built from.
Part of rdar://11305263
llvm-svn: 156107
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index fd6d33463a2..669bf7d4c78 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -584,6 +584,12 @@ void FileManager::GetUniqueIDMapping( UIDToFiles[(*VFE)->getUID()] = *VFE; } +void FileManager::modifyFileEntry(FileEntry *File, + off_t Size, time_t ModificationTime) { + File->Size = Size; + File->ModTime = ModificationTime; +} + void FileManager::PrintStats() const { llvm::errs() << "\n*** File Manager Stats:\n"; |