clang  8.0.0svn
ASTConsumers.h
Go to the documentation of this file.
1 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // AST Consumers.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_FRONTEND_ASTCONSUMERS_H
15 #define LLVM_CLANG_FRONTEND_ASTCONSUMERS_H
16 
17 #include "clang/Basic/LLVM.h"
18 #include <memory>
19 
20 namespace clang {
21 
22 class ASTConsumer;
23 class CodeGenOptions;
24 class DiagnosticsEngine;
25 class FileManager;
26 class LangOptions;
27 class Preprocessor;
28 class TargetOptions;
29 
30 // AST pretty-printer: prints out the AST in a format that is close to the
31 // original C code. The output is intended to be in a format such that
32 // clang could re-parse the output back into the same AST, but the
33 // implementation is still incomplete.
34 std::unique_ptr<ASTConsumer> CreateASTPrinter(std::unique_ptr<raw_ostream> OS,
35  StringRef FilterString);
36 
37 // AST dumper: dumps the raw AST in human-readable form to the given output
38 // stream, or stdout if OS is nullptr.
39 std::unique_ptr<ASTConsumer> CreateASTDumper(std::unique_ptr<raw_ostream> OS,
40  StringRef FilterString,
41  bool DumpDecls, bool Deserialize,
42  bool DumpLookups);
43 
44 // AST Decl node lister: prints qualified names of all filterable AST Decl
45 // nodes.
46 std::unique_ptr<ASTConsumer> CreateASTDeclNodeLister();
47 
48 // Graphical AST viewer: for each function definition, creates a graph of
49 // the AST and displays it with the graph viewer "dotty". Also outputs
50 // function declarations to stderr.
51 std::unique_ptr<ASTConsumer> CreateASTViewer();
52 
53 } // end clang namespace
54 
55 #endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::unique_ptr< ASTConsumer > CreateASTDumper(std::unique_ptr< raw_ostream > OS, StringRef FilterString, bool DumpDecls, bool Deserialize, bool DumpLookups)
Dataflow Directional Tag Classes.
std::unique_ptr< ASTConsumer > CreateASTViewer()
std::unique_ptr< ASTConsumer > CreateASTDeclNodeLister()
std::unique_ptr< ASTConsumer > CreateASTPrinter(std::unique_ptr< raw_ostream > OS, StringRef FilterString)