From f8c3ccdeae8afc3a2268fb7af1957de7a2859731 Mon Sep 17 00:00:00 2001 From: "Jonathan D. Turner" Date: Thu, 7 Jul 2011 22:40:15 +0000 Subject: [PATCH] Remove BoostCon-specific code from Clang. FWIW, I'm a fan of things like this living in a separate branch. llvm-svn: 134649 --- clang/clang.xcodeproj/project.pbxproj | 2 - clang/include/clang/Driver/CC1Options.td | 2 - .../include/clang/Frontend/FrontendActions.h | 6 --- .../include/clang/Frontend/FrontendOptions.h | 1 - clang/lib/Frontend/BoostConAction.cpp | 39 ------------------- clang/lib/Frontend/CMakeLists.txt | 1 - clang/lib/Frontend/CompilerInvocation.cpp | 3 -- .../ExecuteCompilerInvocation.cpp | 1 - 8 files changed, 55 deletions(-) delete mode 100644 clang/lib/Frontend/BoostConAction.cpp diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj index fda6d6f0fa08..832e07ab44f2 100644 --- a/clang/clang.xcodeproj/project.pbxproj +++ b/clang/clang.xcodeproj/project.pbxproj @@ -567,7 +567,6 @@ BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ItaniumCXXABI.cpp; path = lib/CodeGen/ItaniumCXXABI.cpp; sourceTree = ""; }; BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MicrosoftCXXABI.cpp; path = lib/CodeGen/MicrosoftCXXABI.cpp; sourceTree = ""; }; BF9FEE361225E8CF003A8B71 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = lib/CodeGen/README.txt; sourceTree = ""; }; - BF9FEE371225E925003A8B71 /* BoostConAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoostConAction.cpp; path = lib/Frontend/BoostConAction.cpp; sourceTree = ""; }; BF9FEE451225EA24003A8B71 /* DelayedDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DelayedDiagnostic.h; path = clang/Sema/DelayedDiagnostic.h; sourceTree = ""; }; BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Parse/ParseAST.cpp; sourceTree = ""; }; BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAIIObjectsForParser.h; path = lib/Parse/RAIIObjectsForParser.h; sourceTree = ""; }; @@ -906,7 +905,6 @@ 352246E00F5C6BC000D0D279 /* Frontend */ = { isa = PBXGroup; children = ( - BF9FEE371225E925003A8B71 /* BoostConAction.cpp */, 1AFDD8701161085D00AE030A /* ASTMerge.cpp */, 9012911C1048068D0083456D /* ASTUnit.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 6f38ea519947..fcd6f6466ea1 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -356,8 +356,6 @@ def ast_dump_xml : Flag<"-ast-dump-xml">, HelpText<"Build ASTs and then debug dump them in a verbose XML format">; def ast_view : Flag<"-ast-view">, HelpText<"Build ASTs and view them with GraphViz">; -def boostcon : Flag<"-boostcon">, - HelpText<"BoostCon workshop mode">; def print_decl_contexts : Flag<"-print-decl-contexts">, HelpText<"Print DeclContexts and their Decls">; def emit_pth : Flag<"-emit-pth">, diff --git a/clang/include/clang/Frontend/FrontendActions.h b/clang/include/clang/Frontend/FrontendActions.h index 4e67449b8549..b409ad1e0963 100644 --- a/clang/include/clang/Frontend/FrontendActions.h +++ b/clang/include/clang/Frontend/FrontendActions.h @@ -97,12 +97,6 @@ public: virtual bool hasCodeCompletionSupport() const { return true; } }; -class BoostConAction : public SyntaxOnlyAction { -protected: - virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - llvm::StringRef InFile); -}; - /** * \brief Frontend action adaptor that merges ASTs together. * diff --git a/clang/include/clang/Frontend/FrontendOptions.h b/clang/include/clang/Frontend/FrontendOptions.h index 18117e965862..3fedd6b94c27 100644 --- a/clang/include/clang/Frontend/FrontendOptions.h +++ b/clang/include/clang/Frontend/FrontendOptions.h @@ -24,7 +24,6 @@ namespace frontend { ASTDumpXML, ///< Parse ASTs and dump them in XML. ASTPrint, ///< Parse ASTs and print them. ASTView, ///< Parse ASTs and view them in Graphviz. - BoostCon, ///< BoostCon mode. CreateModule, ///< Create module definition DumpRawTokens, ///< Dump out raw tokens. DumpTokens, ///< Dump out preprocessed tokens. diff --git a/clang/lib/Frontend/BoostConAction.cpp b/clang/lib/Frontend/BoostConAction.cpp deleted file mode 100644 index 4a12ff2ebc95..000000000000 --- a/clang/lib/Frontend/BoostConAction.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===-- 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" -#include "clang/AST/RecursiveASTVisitor.h" -#include -#include -using namespace clang; - -namespace { - class BoostConASTConsumer : public ASTConsumer, - public RecursiveASTVisitor { - public: - /// HandleTranslationUnit - This method is called when the ASTs for entire - /// translation unit have been parsed. - virtual void HandleTranslationUnit(ASTContext &Ctx); - - bool VisitCXXRecordDecl(CXXRecordDecl *D) { - std::cout << D->getNameAsString() << std::endl; - return true; - } - }; -} - -ASTConsumer *BoostConAction::CreateASTConsumer(CompilerInstance &CI, - llvm::StringRef InFile) { - return new BoostConASTConsumer(); -} - -void BoostConASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { - fprintf(stderr, "Welcome to BoostCon!\n"); - TraverseDecl(Ctx.getTranslationUnitDecl()); -} diff --git a/clang/lib/Frontend/CMakeLists.txt b/clang/lib/Frontend/CMakeLists.txt index 7dcbebff39b8..556b1333c19b 100644 --- a/clang/lib/Frontend/CMakeLists.txt +++ b/clang/lib/Frontend/CMakeLists.txt @@ -12,7 +12,6 @@ add_clang_library(clangFrontend ASTConsumers.cpp ASTMerge.cpp ASTUnit.cpp - BoostConAction.cpp CacheTokens.cpp CompilerInstance.cpp CompilerInvocation.cpp diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index fd57f59e641f..ebc3340a3d59 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -361,7 +361,6 @@ static const char *getActionName(frontend::ActionKind Kind) { case frontend::ASTDumpXML: return "-ast-dump-xml"; case frontend::ASTPrint: return "-ast-print"; case frontend::ASTView: return "-ast-view"; - case frontend::BoostCon: return "-boostcon"; case frontend::CreateModule: return "-create-module"; case frontend::DumpRawTokens: return "-dump-raw-tokens"; case frontend::DumpTokens: return "-dump-tokens"; @@ -1149,8 +1148,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Opts.ProgramAction = frontend::ASTPrint; break; case OPT_ast_view: Opts.ProgramAction = frontend::ASTView; break; - case OPT_boostcon: - Opts.ProgramAction = frontend::BoostCon; break; case OPT_dump_raw_tokens: Opts.ProgramAction = frontend::DumpRawTokens; break; case OPT_dump_tokens: diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index eb1c208df18b..45095997dcba 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -39,7 +39,6 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case ASTDumpXML: return new ASTDumpXMLAction(); case ASTPrint: return new ASTPrintAction(); case ASTView: return new ASTViewAction(); - case BoostCon: return new BoostConAction(); case CreateModule: return 0; case DumpRawTokens: return new DumpRawTokensAction(); case DumpTokens: return new DumpTokensAction(); -- GitLab