1 //===- ASTContextAllocate.h - ASTContext allocate functions -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares ASTContext allocation functions separate from the main
11 // code in ASTContext.h.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
16 #define LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
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);
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);
38 #endif // LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H