]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Parse/ParseAST.h
MFV r316918: 7990 libzfs: snapspec_cb() does not need to call zfs_strdup()
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Parse / ParseAST.h
1 //===--- ParseAST.h - Define the ParseAST method ----------------*- 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 //  This file defines the clang::ParseAST method.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CLANG_PARSE_PARSEAST_H
15 #define LLVM_CLANG_PARSE_PARSEAST_H
16
17 #include "clang/Basic/LangOptions.h"
18
19 namespace clang {
20   class Preprocessor;
21   class ASTConsumer;
22   class ASTContext;
23   class CodeCompleteConsumer;
24   class Sema;
25
26   /// \brief Parse the entire file specified, notifying the ASTConsumer as
27   /// the file is parsed.
28   ///
29   /// This operation inserts the parsed decls into the translation
30   /// unit held by Ctx.
31   ///
32   /// \param PrintStats Whether to print LLVM statistics related to parsing.
33   /// \param TUKind The kind of translation unit being parsed.
34   /// \param CompletionConsumer If given, an object to consume code completion
35   /// results.
36   /// \param SkipFunctionBodies Whether to skip parsing of function bodies.
37   /// This option can be used, for example, to speed up searches for
38   /// declarations/definitions when indexing.
39   void ParseAST(Preprocessor &pp, ASTConsumer *C,
40                 ASTContext &Ctx, bool PrintStats = false,
41                 TranslationUnitKind TUKind = TU_Complete,
42                 CodeCompleteConsumer *CompletionConsumer = nullptr,
43                 bool SkipFunctionBodies = false);
44
45   /// \brief Parse the main file known to the preprocessor, producing an 
46   /// abstract syntax tree.
47   void ParseAST(Sema &S, bool PrintStats = false,
48                 bool SkipFunctionBodies = false);
49
50 }  // end namespace clang
51
52 #endif