xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang/Interpreter/Transaction.h (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
1 //===--- Transaction.h - Incremental Compilation and Execution---*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines utilities tracking the incrementally processed pieces of
10 // code.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_INTERPRETER_TRANSACTION_H
15 #define LLVM_CLANG_INTERPRETER_TRANSACTION_H
16 
17 #include <memory>
18 #include <vector>
19 
20 namespace llvm {
21 class Module;
22 }
23 
24 namespace clang {
25 
26 class DeclGroupRef;
27 
28 /// The class keeps track of various objects created as part of processing
29 /// incremental inputs.
30 struct Transaction {
31   /// The decls created for the input.
32   std::vector<clang::DeclGroupRef> Decls;
33 
34   /// The llvm IR produced for the input.
35   std::unique_ptr<llvm::Module> TheModule;
36 };
37 } // namespace clang
38 
39 #endif // LLVM_CLANG_INTERPRETER_TRANSACTION_H
40