Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:54

0001 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // AST Consumers.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_CLANG_FRONTEND_ASTCONSUMERS_H
0014 #define LLVM_CLANG_FRONTEND_ASTCONSUMERS_H
0015 
0016 #include "clang/AST/ASTDumperUtils.h"
0017 #include "clang/Basic/LLVM.h"
0018 #include <memory>
0019 
0020 namespace clang {
0021 
0022 class ASTConsumer;
0023 
0024 // AST pretty-printer: prints out the AST in a format that is close to the
0025 // original C code.  The output is intended to be in a format such that
0026 // clang could re-parse the output back into the same AST, but the
0027 // implementation is still incomplete.
0028 std::unique_ptr<ASTConsumer> CreateASTPrinter(std::unique_ptr<raw_ostream> OS,
0029                                               StringRef FilterString);
0030 
0031 // AST dumper: dumps the raw AST in human-readable form to the given output
0032 // stream, or stdout if OS is nullptr.
0033 std::unique_ptr<ASTConsumer>
0034 CreateASTDumper(std::unique_ptr<raw_ostream> OS, StringRef FilterString,
0035                 bool DumpDecls, bool Deserialize, bool DumpLookups,
0036                 bool DumpDeclTypes, ASTDumpOutputFormat Format);
0037 
0038 // AST Decl node lister: prints qualified names of all filterable AST Decl
0039 // nodes.
0040 std::unique_ptr<ASTConsumer> CreateASTDeclNodeLister();
0041 
0042 // Graphical AST viewer: for each function definition, creates a graph of
0043 // the AST and displays it with the graph viewer "dotty".  Also outputs
0044 // function declarations to stderr.
0045 std::unique_ptr<ASTConsumer> CreateASTViewer();
0046 
0047 } // end clang namespace
0048 
0049 #endif