OLD | NEW |
(Empty) | |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 // Author: ajwong@google.com (Albert Wong) |
| 3 |
| 4 #ifndef BIND_MIGRATE_CONSUSUMER_H_ |
| 5 #define BIND_MIGRATE_CONSUSUMER_H_ |
| 6 |
| 7 #include <memory> |
| 8 |
| 9 #include "clang/AST/ASTConsumer.h" |
| 10 #include "clang/Basic/SourceLocation.h" |
| 11 #include "clang/Rewrite/Rewriter.h" |
| 12 |
| 13 #include "BindMigrateOptions.h" |
| 14 #include "DiagnosticEmitter.h" |
| 15 #include "FileRemapper.h" |
| 16 |
| 17 namespace clang { |
| 18 |
| 19 namespace arcmt_hack { |
| 20 class FileRemapper; |
| 21 } // namespace arcmt_hack |
| 22 |
| 23 class DiagnosticEmitter; |
| 24 |
| 25 class BindMigrateConsumer : public clang::ASTConsumer { |
| 26 public: |
| 27 BindMigrateConsumer(clang::CompilerInstance* instance, |
| 28 const BindMigrateOptions& options); |
| 29 virtual ~BindMigrateConsumer(); |
| 30 |
| 31 virtual void Initialize(clang::ASTContext &context); |
| 32 virtual void HandleTranslationUnit(clang::ASTContext &context); |
| 33 |
| 34 private: |
| 35 clang::CompilerInstance* instance_; |
| 36 DiagnosticEmitter error_emitter_; |
| 37 clang::FileID source_file_; |
| 38 clang::Rewriter rewriter_; |
| 39 arcmt_hack::FileRemapper remapper_; |
| 40 BindMigrateOptions options_; |
| 41 }; |
| 42 |
| 43 } // namespace clang |
| 44 |
| 45 |
| 46 #endif // BIND_MIGRATE_CONSUSUMER_H_ |
OLD | NEW |