]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/AST/ASTContextAllocate.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / AST / ASTContextAllocate.h
1 //===- ASTContextAllocate.h - ASTContext allocate functions -----*- 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 declares ASTContext allocation functions separate from the main
11 //  code in ASTContext.h.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
16 #define LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
17
18 #include <cstddef>
19
20 namespace clang {
21
22 class ASTContext;
23
24 } // namespace clang
25
26 // Defined in ASTContext.h
27 void *operator new(size_t Bytes, const clang::ASTContext &C,
28                    size_t Alignment = 8);
29 void *operator new[](size_t Bytes, const clang::ASTContext &C,
30                      size_t Alignment = 8);
31
32 // It is good practice to pair new/delete operators.  Also, MSVC gives many
33 // warnings if a matching delete overload is not declared, even though the
34 // throw() spec guarantees it will not be implicitly called.
35 void operator delete(void *Ptr, const clang::ASTContext &C, size_t);
36 void operator delete[](void *Ptr, const clang::ASTContext &C, size_t);
37
38 #endif // LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H