clang API Documentation
#include <FileRemapper.h>
Public Member Functions | |
FileRemapper () | |
~FileRemapper () | |
bool | initFromDisk (StringRef outputDir, DiagnosticsEngine &Diag, bool ignoreIfFilesChanged) |
bool | initFromFile (StringRef filePath, DiagnosticsEngine &Diag, bool ignoreIfFilesChanged) |
bool | flushToDisk (StringRef outputDir, DiagnosticsEngine &Diag) |
bool | flushToFile (StringRef outputPath, DiagnosticsEngine &Diag) |
bool | overwriteOriginal (DiagnosticsEngine &Diag, StringRef outputDir=StringRef()) |
void | remap (StringRef filePath, std::unique_ptr< llvm::MemoryBuffer > memBuf) |
void | applyMappings (PreprocessorOptions &PPOpts) const |
void | clear (StringRef outputDir=StringRef()) |
Definition at line 31 of file FileRemapper.h.
Definition at line 23 of file FileRemapper.cpp.
Definition at line 27 of file FileRemapper.cpp.
References clear().
void FileRemapper::applyMappings | ( | PreprocessorOptions & | PPOpts | ) | const |
Definition at line 192 of file FileRemapper.cpp.
References clang::PreprocessorOptions::addRemappedFile(), and clang::PreprocessorOptions::RetainRemappedFileBuffers.
Referenced by clang::arcmt::MigrationProcess::applyTransform(), and clang::arcmt::getFileRemappings().
void FileRemapper::clear | ( | StringRef | outputDir = StringRef() | ) |
Definition at line 31 of file FileRemapper.cpp.
Referenced by overwriteOriginal(), and ~FileRemapper().
bool FileRemapper::flushToDisk | ( | StringRef | outputDir, |
DiagnosticsEngine & | Diag | ||
) |
Definition at line 110 of file FileRemapper.cpp.
References flushToFile().
Referenced by applyTransforms().
bool FileRemapper::flushToFile | ( | StringRef | outputPath, |
DiagnosticsEngine & | Diag | ||
) |
Definition at line 120 of file FileRemapper.cpp.
References Diag(), clang::FileEntry::getModificationTime(), clang::FileEntry::getName(), and remap().
Referenced by flushToDisk().
bool FileRemapper::initFromDisk | ( | StringRef | outputDir, |
DiagnosticsEngine & | Diag, | ||
bool | ignoreIfFilesChanged | ||
) |
Definition at line 50 of file FileRemapper.cpp.
References initFromFile().
Referenced by clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::arcmt::getFileRemappings(), and clang::arcmt::MigrationProcess::MigrationProcess().
bool FileRemapper::initFromFile | ( | StringRef | filePath, |
DiagnosticsEngine & | Diag, | ||
bool | ignoreIfFilesChanged | ||
) |
Definition at line 56 of file FileRemapper.cpp.
References clang::FileEntry::getModificationTime(), and remap().
Referenced by initFromDisk().
bool FileRemapper::overwriteOriginal | ( | DiagnosticsEngine & | Diag, |
StringRef | outputDir = StringRef() |
||
) |
Definition at line 166 of file FileRemapper.cpp.
References clear(), Diag(), and clang::FileEntry::getName().
Referenced by applyTransforms().
void FileRemapper::remap | ( | StringRef | filePath, |
std::unique_ptr< llvm::MemoryBuffer > | memBuf | ||
) |
Definition at line 206 of file FileRemapper.cpp.
Referenced by clang::arcmt::MigrationProcess::applyTransform(), flushToFile(), and initFromFile().