clang 19.0.0git
Public Member Functions | List of all members
clang::arcmt::FileRemapper Class Reference

#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())

Detailed Description

Definition at line 32 of file FileRemapper.h.

Constructor & Destructor Documentation

◆ FileRemapper()

FileRemapper::FileRemapper ( )

Definition at line 22 of file FileRemapper.cpp.

◆ ~FileRemapper()

FileRemapper::~FileRemapper ( )

Definition at line 26 of file FileRemapper.cpp.

References clear().

Member Function Documentation

◆ applyMappings()

void FileRemapper::applyMappings ( PreprocessorOptions PPOpts) const

◆ clear()

void FileRemapper::clear ( StringRef  outputDir = StringRef())

Definition at line 30 of file FileRemapper.cpp.

References E.

Referenced by overwriteOriginal(), and ~FileRemapper().

◆ flushToDisk()

bool FileRemapper::flushToDisk ( StringRef  outputDir,
DiagnosticsEngine Diag 

Definition at line 109 of file FileRemapper.cpp.

References Diag(), and flushToFile().

Referenced by applyTransforms().

◆ flushToFile()

bool FileRemapper::flushToFile ( StringRef  outputPath,
DiagnosticsEngine Diag 

◆ forEachMapping()

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().

◆ initFromDisk()

bool FileRemapper::initFromDisk ( StringRef  outputDir,
DiagnosticsEngine Diag,
bool  ignoreIfFilesChanged 

◆ initFromFile()

bool FileRemapper::initFromFile ( StringRef  filePath,
DiagnosticsEngine Diag,
bool  ignoreIfFilesChanged 

Definition at line 55 of file FileRemapper.cpp.

References Diag(), and remap().

Referenced by initFromDisk().

◆ overwriteOriginal()

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().

◆ remap()

void FileRemapper::remap ( StringRef  filePath,
std::unique_ptr< llvm::MemoryBuffer >  memBuf 

The documentation for this class was generated from the following files: