blob: 505d5afe3e72eadd8a332742a8a02f3a7c9d84fe [file] [log] [blame]
Douglas Gregorf78cc432010-05-07 15:41:56 +00001//===-- 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"
Douglas Gregorffb507a2010-05-07 15:59:09 +000011#include <cstdio>
Douglas Gregorf78cc432010-05-07 15:41:56 +000012using namespace clang;
13
14namespace {
15 class BoostConASTConsumer : public ASTConsumer {
16 public:
17 /// HandleTranslationUnit - This method is called when the ASTs for entire
18 /// translation unit have been parsed.
19 virtual void HandleTranslationUnit(ASTContext &Ctx);
20 };
21}
22
23ASTConsumer *BoostConAction::CreateASTConsumer(CompilerInstance &CI,
24 llvm::StringRef InFile) {
25 return new BoostConASTConsumer();
26}
27
28void BoostConASTConsumer::HandleTranslationUnit(ASTContext &Ctx) {
29 fprintf(stderr, "Welcome to BoostCon!\n");
30}