#include "clang/ARCMigrate/FileRemapper.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <fstream>
usingnamespaceclang;
usingnamespacearcmt;
FileRemapper::FileRemapper() { … }
FileRemapper::~FileRemapper() { … }
void FileRemapper::clear(StringRef outputDir) { … }
std::string FileRemapper::getRemapInfoFile(StringRef outputDir) { … }
bool FileRemapper::initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag,
bool ignoreIfFilesChanged) { … }
bool FileRemapper::initFromFile(StringRef filePath, DiagnosticsEngine &Diag,
bool ignoreIfFilesChanged) { … }
bool FileRemapper::flushToDisk(StringRef outputDir, DiagnosticsEngine &Diag) { … }
bool FileRemapper::flushToFile(StringRef outputPath, DiagnosticsEngine &Diag) { … }
bool FileRemapper::overwriteOriginal(DiagnosticsEngine &Diag,
StringRef outputDir) { … }
void FileRemapper::forEachMapping(
llvm::function_ref<void(StringRef, StringRef)> CaptureFile,
llvm::function_ref<void(StringRef, const llvm::MemoryBufferRef &)>
CaptureBuffer) const { … }
void FileRemapper::applyMappings(PreprocessorOptions &PPOpts) const { … }
void FileRemapper::remap(StringRef filePath,
std::unique_ptr<llvm::MemoryBuffer> memBuf) { … }
void FileRemapper::remap(FileEntryRef File,
std::unique_ptr<llvm::MemoryBuffer> MemBuf) { … }
void FileRemapper::remap(FileEntryRef File, FileEntryRef NewFile) { … }
OptionalFileEntryRef FileRemapper::getOriginalFile(StringRef filePath) { … }
void FileRemapper::resetTarget(Target &targ) { … }
bool FileRemapper::report(const Twine &err, DiagnosticsEngine &Diag) { … }