Lines Matching defs:file
1 //===--- FileRemapper.cpp - File Remapping Helper -------------------------===//
5 // This file is distributed under the University of Illinois Open Source
71 return report("Error opening file: " + infoFile, Diag);
80 return report("Invalid file data: '" + lines[idx+1] + "' not a number",
88 return report("File does not exist: " + fromFilename, Diag);
94 return report("File does not exist: " + toFilename, Diag);
100 return report("File was modified: " + fromFilename, Diag);
153 return report("Could not create file: " + tempPath.str(), Diag);
181 return report(StringRef("File does not exist: ") + origFE->getName(),
233 void FileRemapper::remap(const FileEntry *file, llvm::MemoryBuffer *memBuf) {
234 assert(file);
235 Target &targ = FromToMappings[file];
240 void FileRemapper::remap(const FileEntry *file, const FileEntry *newfile) {
241 assert(file && newfile);
242 Target &targ = FromToMappings[file];
245 ToFromMappings[newfile] = file;
249 const FileEntry *file = FileMgr->getFile(filePath);
250 // If we are updating a file that overriden an original file,
251 // actually update the original file.
253 I = ToFromMappings.find(file);
255 file = I->second;
256 assert(FromToMappings.find(file) != FromToMappings.end() &&
257 "Original file not in mappings!");
259 return file;