Lines Matching defs:File
5 // This file is distributed under the University of Illinois Open Source
10 // Builds up an LLVM archive file (.a) containing LLVM bitcode.
51 // small ones and four for large ones. We expect this to access file offsets
155 // Insert a file into the archive before some other member. This also takes care
156 // of extracting the necessary flags and information from the file.
163 *ErrMsg = "Can not add a non-existent file to archive";
200 // Write one member out to the file.
215 // member's in-memory data or directly from the file.
220 OwningPtr<MemoryBuffer> File;
221 if (error_code ec = MemoryBuffer::getFile(member.getPath().c_str(), File)) {
226 mFile = File.take();
232 // symbol table if it's a bitcode file.
271 // Write header to archive file
280 // Write the (possibly compressed) member's content to the file.
287 // Close the mapped file if it was opened
292 // Write out the LLVM symbol table as an archive member to the file.
325 // Write out the file index
334 // Now that we're done with the symbol table, get the ending file position
339 // critical for file integrity purposes.
347 // Write the entire archive to the file specified when the archive was created.
348 // This writes to a temporary file first. Options are for creating a symbol
349 // table, flattening the file names (no directories, 15 chars max) and
355 // Make sure they haven't opened up the file, not loaded it,
356 // but are now trying to write it which would wipe out the file.
363 // Create a temporary file to store the archive in
371 // Create archive file for output.
376 // Check for errors opening or creating archive file.
380 *ErrMsg = "Error opening archive file: " + archPath.str();
404 // Close archive file.
409 // At this point we have written a file that is a legal archive but it
412 // table first in the file. Unfortunately, this means mapping the file
413 // we just wrote back in and copying it to the destination file.
426 // Open another temporary file in order to avoid invalidating the
436 *ErrMsg = "Error opening archive file: " + FinalFilePath.str();
440 // Write the file magic number
443 // If there is a foreign symbol table, put it into the file now. Most
459 // Copy the temporary file contents being sure to skip the file's magic
468 // Move the final file over top of TmpArchive
475 // this because we cannot replace an open file on Windows.
481 // Set correct read and write permissions after temporary file is moved