diff options
Diffstat (limited to 'llvm/lib/Bytecode/Archive/ArchiveWriter.cpp')
| -rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp index 9d5b025b057..fc85374c020 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp @@ -163,7 +163,10 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where, mbr->data = 0; mbr->path = filePath; - if (mbr->path.getFileStatus(mbr->info, false, ErrMsg)) + const sys::FileStatus *FSInfo = mbr->path.getFileStatus(false, ErrMsg); + if (FSInfo) + mbr->info = *FSInfo; + else return true; unsigned flags = 0; |

