9 #ifndef LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H 10 #define LLVM_CLANG_LIB_ARCMIGRATE_INTERNALS_H 14 #include "llvm/ADT/ArrayRef.h" 15 #include "llvm/ADT/Optional.h" 25 typedef std::list<StoredDiagnostic> ListTy;
39 iterator
begin()
const {
return List.begin(); }
40 iterator
end()
const {
return List.end(); }
57 void startTransaction();
58 bool commitTransaction();
59 void abortTransaction();
64 void removeStmt(
Stmt *S);
67 void replaceStmt(
Stmt *S, StringRef text);
69 StringRef replacementText);
78 unsigned IDs[] = { ID1, ID2 };
83 unsigned IDs[] = { ID1, ID2, ID3 };
92 unsigned IDs[] = { ID1, ID2 };
158 std::vector<SourceLocation> &ARCMTMacroLocs)
159 : Ctx(Ctx), OrigGCMode(OrigGCMode), MigOptions(),
160 SemaRef(sema), TA(TA), CapturedDiags(capturedDiags),
161 ARCMTMacroLocs(ARCMTMacroLocs) { }
169 bool CFBridgingFunctionsDefined();
173 return "__IMPL_ARCMT_REMOVED_EXPR__";
unsigned NoFinalizeRemoval
MigrationPass(ASTContext &Ctx, LangOptions::GCMode OrigGCMode, Sema &sema, TransformActions &TA, const CapturedDiagList &capturedDiags, std::vector< SourceLocation > &ARCMTMacroLocs)
Stmt - This represents one statement.
ListTy::const_iterator iterator
static StringRef getARCMTMacroName()
Represents a diagnostic in a form that can be retained until its corresponding source manager is dest...
void push_back(const StoredDiagnostic &diag)
bool hasDiagnostic(ArrayRef< unsigned > IDs, SourceRange range) const
void setNoFinalizeRemoval(bool val)
const CapturedDiagList & getDiags() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
bool clearDiagnostic(ArrayRef< unsigned > IDs, SourceRange range)
void reportDiagnostics(DiagnosticsEngine &diags) const
Concrete class used by the front-end to report problems and issues.
bool hasUnrecoverableErrorOccurred() const
Determine whether any kind of unrecoverable error has occurred.
Defines the Diagnostic-related interfaces.
Sema - This implements semantic analysis and AST building for C.
A little helper class used to produce diagnostics.
Represents a character-granular source range.
void writeARCDiagsToPlist(const std::string &outPath, ArrayRef< StoredDiagnostic > diags, SourceManager &SM, const LangOptions &LangOpts)
Encodes a location in the source.
bool noFinalizeRemoval() const
Dataflow Directional Tag Classes.
const CapturedDiagList & CapturedDiags
Transaction(TransformActions &TA)
std::vector< SourceLocation > & ARCMTMacroLocs
Optional< bool > EnableCFBridgeFns
MigratorOptions MigOptions
bool isGCMigration() const
LangOptions::GCMode OrigGCMode
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.