10 #ifndef LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H 11 #define LLVM_CLANG_ARCMIGRATE_FILEREMAPPER_H 14 #include "llvm/ADT/DenseMap.h" 15 #include "llvm/ADT/PointerUnion.h" 16 #include "llvm/ADT/StringRef.h" 26 class DiagnosticsEngine;
27 class PreprocessorOptions;
33 std::unique_ptr<FileManager> FileMgr;
35 typedef llvm::PointerUnion<const FileEntry *, llvm::MemoryBuffer *> Target;
36 typedef llvm::DenseMap<const FileEntry *, Target> MappingsTy;
37 MappingsTy FromToMappings;
39 llvm::DenseMap<const FileEntry *, const FileEntry *> ToFromMappings;
46 bool ignoreIfFilesChanged);
48 bool ignoreIfFilesChanged);
53 StringRef outputDir = StringRef());
55 void remap(StringRef filePath, std::unique_ptr<llvm::MemoryBuffer> memBuf);
59 void clear(StringRef outputDir = StringRef());
62 void remap(
const FileEntry *file, std::unique_ptr<llvm::MemoryBuffer> memBuf);
65 const FileEntry *getOriginalFile(StringRef filePath);
66 void resetTarget(Target &targ);
70 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.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
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.