summaryrefslogtreecommitdiffstats
path: root/clang/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
commit542ad315977cb928130d87e3a72572900e54bc2d (patch)
treee7f329b137f6a8e403e8356779d963bb8622d128 /clang/lib/Frontend/BoostConAction.cpp
parent5d5b8b1b8c8719d0ac362b8bc12957fc79de4595 (diff)
downloadbcm5719-llvm-542ad315977cb928130d87e3a72572900e54bc2d.tar.gz
bcm5719-llvm-542ad315977cb928130d87e3a72572900e54bc2d.zip
Add a stub frontend action for BoostCon, for next week's workshop.
llvm-svn: 103258
Diffstat (limited to 'clang/lib/Frontend/BoostConAction.cpp')
-rw-r--r--clang/lib/Frontend/BoostConAction.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/lib/Frontend/BoostConAction.cpp b/clang/lib/Frontend/BoostConAction.cpp
new file mode 100644
index 00000000000..9e4f97dbc38
--- /dev/null
+++ b/clang/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");
+}
OpenPOWER on IntegriCloud