r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111873
91177308-0d34-0410-b5e6-
96231b3b80d8
/// a seekable stream.
void CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS);
-
-/// ExecuteCompilerInvocation - Execute the given actions described by the
-/// compiler invocation object in the given compiler instance.
-///
-/// \return - True on success.
-bool ExecuteCompilerInvocation(CompilerInstance *Clang);
-
} // end namespace clang
#endif
--- /dev/null
+//===--- Utils.h - Misc utilities for the front-end -------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This header contains miscellaneous utilities for various front-end actions
+// which were split from Frontend to minimise Frontend's dependencies.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_FRONTENDTOOL_UTILS_H
+#define LLVM_CLANG_FRONTENDTOOL_UTILS_H
+
+namespace clang {
+
+class CompilerInstance;
+
+/// ExecuteCompilerInvocation - Execute the given actions described by the
+/// compiler invocation object in the given compiler instance.
+///
+/// \return - True on success.
+bool ExecuteCompilerInvocation(CompilerInstance *Clang);
+
+} // end namespace clang
+
+#endif
add_subdirectory(Driver)
add_subdirectory(Serialization)
add_subdirectory(Frontend)
+add_subdirectory(FrontendTool)
add_subdirectory(Index)
add_subdirectory(Checker)
DependencyFile.cpp
DiagChecker.cpp
DocumentXML.cpp
- ExecuteCompilerInvocation.cpp
FrontendAction.cpp
FrontendActions.cpp
FrontendOptions.cpp
--- /dev/null
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangFrontendTool
+ ExecuteCompilerInvocation.cpp
+ )
//
//===----------------------------------------------------------------------===//
-#include "clang/Frontend/Utils.h"
+#include "clang/FrontendTool/Utils.h"
#include "clang/Checker/FrontendActions.h"
#include "clang/CodeGen/CodeGenAction.h"
#include "clang/Driver/CC1Options.h"
--- /dev/null
+##===- clang/lib/FrontendTool/Makefile ---------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+CLANG_LEVEL := ../..
+LIBRARYNAME := clangFrontendTool
+
+include $(CLANG_LEVEL)/Makefile
CLANG_LEVEL := ..
PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis \
- Checker Rewrite Serialization Frontend Index Driver
+ Checker Rewrite Serialization Frontend FrontendTool Index Driver
include $(CLANG_LEVEL)/Makefile
set(LLVM_NO_RTTI 1)
set( LLVM_USED_LIBS
+ clangFrontendTool
clangFrontend
clangDriver
clangSerialization
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
ipo selectiondag
-USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangCodeGen.a \
- clangParse.a clangSema.a clangChecker.a clangAnalysis.a \
- clangIndex.a clangRewrite.a clangAST.a clangLex.a clangBasic.a
+USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
+ clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
+ clangChecker.a clangAnalysis.a clangIndex.a clangRewrite.a \
+ clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/TextDiagnosticBuffer.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
-#include "clang/Frontend/Utils.h"
+#include "clang/FrontendTool/Utils.h"
#include "llvm/LLVMContext.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/ErrorHandling.h"