9 #ifndef LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H 10 #define LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H 13 #include "llvm/ADT/DenseMap.h" 14 #include "llvm/ADT/PointerUnion.h" 15 #include "llvm/ADT/StringRef.h" 25 class DiagnosticsEngine;
26 class PreprocessorOptions;
32 std::unique_ptr<FileManager> FileMgr;
34 typedef llvm::PointerUnion<const FileEntry *, llvm::MemoryBuffer *> Target;
35 typedef llvm::DenseMap<const FileEntry *, Target> MappingsTy;
36 MappingsTy FromToMappings;
38 llvm::DenseMap<const FileEntry *, const FileEntry *> ToFromMappings;
45 bool ignoreIfFilesChanged);
47 bool ignoreIfFilesChanged);
52 StringRef outputDir = StringRef());
54 void remap(StringRef filePath, std::unique_ptr<llvm::MemoryBuffer> memBuf);
58 void clear(StringRef outputDir = StringRef());
61 void remap(
const FileEntry *file, std::unique_ptr<llvm::MemoryBuffer> memBuf);
64 const FileEntry *getOriginalFile(StringRef filePath);
65 void resetTarget(Target &targ);
69 std::string getRemapInfoFile(StringRef outputDir);
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Concrete class used by the front-end to report problems and issues.
Cached information about one file (either on disk or in the virtual file system). ...
Dataflow Directional Tag Classes.