Douglas Gregor | f78cc43 | 2010-05-07 15:41:56 +0000 | [diff] [blame] | 1 | //===-- BoostConAction.cpp - BoostCon Workshop Action -----------*- 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 | #include "clang/Frontend/FrontendActions.h" |
| 10 | #include "clang/AST/ASTConsumer.h" |
| 11 | using namespace clang; |
| 12 | |
| 13 | namespace { |
| 14 | class BoostConASTConsumer : public ASTConsumer { |
| 15 | public: |
| 16 | /// HandleTranslationUnit - This method is called when the ASTs for entire |
| 17 | /// translation unit have been parsed. |
| 18 | virtual void HandleTranslationUnit(ASTContext &Ctx); |
| 19 | }; |
| 20 | } |
| 21 | |
| 22 | ASTConsumer *BoostConAction::CreateASTConsumer(CompilerInstance &CI, |
| 23 | llvm::StringRef InFile) { |
| 24 | return new BoostConASTConsumer(); |
| 25 | } |
| 26 | |
| 27 | void BoostConASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { |
| 28 | fprintf(stderr, "Welcome to BoostCon!\n"); |
| 29 | } |