clang  3.7.0
ARCMTActions.h
Go to the documentation of this file.
1 //===--- ARCMTActions.h - ARC Migrate Tool Frontend Actions -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_ARCMIGRATE_ARCMTACTIONS_H
11 #define LLVM_CLANG_ARCMIGRATE_ARCMTACTIONS_H
12 
15 #include <memory>
16 
17 namespace clang {
18 namespace arcmt {
19 
21 protected:
22  bool BeginInvocation(CompilerInstance &CI) override;
23 
24 public:
25  CheckAction(FrontendAction *WrappedAction);
26 };
27 
29 protected:
30  bool BeginInvocation(CompilerInstance &CI) override;
31 
32 public:
33  ModifyAction(FrontendAction *WrappedAction);
34 };
35 
37  FileRemapper Remapper;
38 protected:
39  bool BeginInvocation(CompilerInstance &CI) override;
40  std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
41  StringRef InFile) override;
42 };
43 
45  std::string MigrateDir;
46  std::string PlistOut;
47  bool EmitPremigrationARCErros;
48 protected:
49  bool BeginInvocation(CompilerInstance &CI) override;
50 
51 public:
52  MigrateAction(FrontendAction *WrappedAction, StringRef migrateDir,
53  StringRef plistOut,
54  bool emitPremigrationARCErrors);
55 };
56 
57 /// \brief Migrates to modern ObjC syntax.
59  std::string MigrateDir;
60  unsigned ObjCMigAction;
61  FileRemapper Remapper;
62  CompilerInstance *CompInst;
63 public:
64  ObjCMigrateAction(FrontendAction *WrappedAction, StringRef migrateDir,
65  unsigned migrateAction);
66 
67 protected:
68  std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
69  StringRef InFile) override;
70  bool BeginInvocation(CompilerInstance &CI) override;
71 };
72 
73 }
74 }
75 
76 #endif
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
Definition: ObjCMT.cpp:2001
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Definition: ObjCMT.cpp:193
ObjCMigrateAction(FrontendAction *WrappedAction, StringRef migrateDir, unsigned migrateAction)
Definition: ObjCMT.cpp:182
Abstract base class for actions which can be performed by the frontend.
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
Migrates to modern ObjC syntax.
Definition: ARCMTActions.h:58
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
Definition: ObjCMT.cpp:205
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Definition: ObjCMT.cpp:2026
CheckAction(FrontendAction *WrappedAction)
Abstract base class to use for AST consumer-based frontend actions.
A frontend action which simply wraps some other runtime-specified frontend action.
MigrateAction(FrontendAction *WrappedAction, StringRef migrateDir, StringRef plistOut, bool emitPremigrationARCErrors)
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
Defines the clang::FrontendAction interface and various convenience abstract classes (clang::ASTFront...
ModifyAction(FrontendAction *WrappedAction)