aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/BoostConAction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-07 15:41:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-07 15:41:56 +0000
commitf78cc4360eb4284091d0d38f3055084360f8c753 (patch)
tree1026af8459ae4f9f02b3f558e03bdbb8d6fed416 /lib/Frontend/BoostConAction.cpp
parenta7d3c04fcfe9d4af2f7758f46aef26b1a8f8ac09 (diff)
Add a stub frontend action for BoostCon, for next week's workshop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/BoostConAction.cpp')
-rw-r--r--lib/Frontend/BoostConAction.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Frontend/BoostConAction.cpp b/lib/Frontend/BoostConAction.cpp
new file mode 100644
index 0000000000..9e4f97dbc3
--- /dev/null
+++ b/lib/Frontend/BoostConAction.cpp
@@ -0,0 +1,29 @@
+//===-- BoostConAction.cpp - BoostCon Workshop Action -----------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+#include "clang/Frontend/FrontendActions.h"
+#include "clang/AST/ASTConsumer.h"
+using namespace clang;
+
+namespace {
+ class BoostConASTConsumer : public ASTConsumer {
+ public:
+ /// HandleTranslationUnit - This method is called when the ASTs for entire
+ /// translation unit have been parsed.
+ virtual void HandleTranslationUnit(ASTContext &Ctx);
+ };
+}
+
+ASTConsumer *BoostConAction::CreateASTConsumer(CompilerInstance &CI,
+ llvm::StringRef InFile) {
+ return new BoostConASTConsumer();
+}
+
+void BoostConASTConsumer::HandleTranslationUnit(ASTContext &Ctx) {
+ fprintf(stderr, "Welcome to BoostCon!\n");
+}