diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-15 17:48:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-15 17:48:49 +0000 |
commit | 9b414d3e2d0cb84512b55a3275a98490b090162a (patch) | |
tree | a9e89bf09e843286a73c99a9e18520c48ad725b0 /include/clang/Frontend/BackendUtil.h | |
parent | c722ea4fbf886d6460b256b5e819a4ee751d5fff (diff) |
Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/BackendUtil.h')
-rw-r--r-- | include/clang/Frontend/BackendUtil.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/include/clang/Frontend/BackendUtil.h b/include/clang/Frontend/BackendUtil.h deleted file mode 100644 index 39c743c634..0000000000 --- a/include/clang/Frontend/BackendUtil.h +++ /dev/null @@ -1,32 +0,0 @@ -//===--- BackendUtil.h - LLVM Backend Utilities -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -namespace llvm { - class Module; - class raw_ostream; -} - -namespace clang { - class Diagnostic; - class CodeGenOptions; - class TargetOptions; - - enum BackendAction { - Backend_EmitAssembly, ///< Emit native assembly files - Backend_EmitBC, ///< Emit LLVM bitcode files - Backend_EmitLL, ///< Emit human-readable LLVM assembly - Backend_EmitNothing, ///< Don't emit anything (benchmarking mode) - Backend_EmitMCNull, ///< Run CodeGen, but don't emit anything - Backend_EmitObj ///< Emit native object files - }; - - void EmitBackendOutput(Diagnostic &Diags, const CodeGenOptions &CGOpts, - const TargetOptions &TOpts, llvm::Module *M, - BackendAction Action, llvm::raw_ostream *OS); -} |