clang 20.0.0git
|
#include "clang/ARCMigrate/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 | forEachMapping (llvm::function_ref< void(StringRef, StringRef)> CaptureFile, llvm::function_ref< void(StringRef, const llvm::MemoryBufferRef &)> CaptureBuffer) const |
Iterate through all the mappings. | |
void | clear (StringRef outputDir=StringRef()) |
Definition at line 32 of file FileRemapper.h.
FileRemapper::FileRemapper | ( | ) |
Definition at line 22 of file FileRemapper.cpp.
FileRemapper::~FileRemapper | ( | ) |
Definition at line 26 of file FileRemapper.cpp.
References clear().
void FileRemapper::applyMappings | ( | PreprocessorOptions & | PPOpts | ) | const |
Definition at line 209 of file FileRemapper.cpp.
References clang::PreprocessorOptions::addRemappedFile(), E, and clang::PreprocessorOptions::RetainRemappedFileBuffers.
Referenced by clang::arcmt::MigrationProcess::applyTransform().
void FileRemapper::clear | ( | StringRef | outputDir = StringRef() | ) |
Definition at line 30 of file FileRemapper.cpp.
References E.
Referenced by overwriteOriginal(), and ~FileRemapper().
bool FileRemapper::flushToDisk | ( | StringRef | outputDir, |
DiagnosticsEngine & | Diag | ||
) |
Definition at line 109 of file FileRemapper.cpp.
References Diag(), and flushToFile().
Referenced by applyTransforms().
bool FileRemapper::flushToFile | ( | StringRef | outputPath, |
DiagnosticsEngine & | Diag | ||
) |
Definition at line 119 of file FileRemapper.cpp.
References Diag(), E, clang::FileEntryRef::getModificationTime(), clang::FileEntryRef::getName(), and remap().
Referenced by flushToDisk().
void FileRemapper::forEachMapping | ( | llvm::function_ref< void(StringRef, StringRef)> | CaptureFile, |
llvm::function_ref< void(StringRef, const llvm::MemoryBufferRef &)> | CaptureBuffer | ||
) | const |
Iterate through all the mappings.
Definition at line 194 of file FileRemapper.cpp.
Referenced by clang::arcmt::getFileRemappings().
bool FileRemapper::initFromDisk | ( | StringRef | outputDir, |
DiagnosticsEngine & | Diag, | ||
bool | ignoreIfFilesChanged | ||
) |
Definition at line 49 of file FileRemapper.cpp.
References Diag(), and 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 55 of file FileRemapper.cpp.
References Diag(), and remap().
Referenced by initFromDisk().
bool FileRemapper::overwriteOriginal | ( | DiagnosticsEngine & | Diag, |
StringRef | outputDir = StringRef() |
||
) |
Definition at line 168 of file FileRemapper.cpp.
References clear(), Diag(), E, and clang::FileEntryRef::getName().
Referenced by applyTransforms().
void FileRemapper::remap | ( | StringRef | filePath, |
std::unique_ptr< llvm::MemoryBuffer > | memBuf | ||
) |
Definition at line 223 of file FileRemapper.cpp.
References clang::File, and remap().
Referenced by clang::arcmt::MigrationProcess::applyTransform(), flushToFile(), initFromFile(), and remap().