clang 24.0.0git
ClassUtils.h
Go to the documentation of this file.
1//===--- ClassUtils.h - Shared C++ class emission queries -------*- 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 holds the AST queries about C++ class construction and destruction
10// that both classic CodeGen and CIR CodeGen need, chiefly to decide when a
11// vtable pointer has to be established before running member initializers or
12// a destructor body.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_CLANG_CODEGENUTILS_CLASSUTILS_H
17#define LLVM_CLANG_CODEGENUTILS_CLASSUTILS_H
18
20
21namespace clang::CodeGenUtils {
22
23/// Check whether \p Init uses 'this' in a way which requires the vtable to be
24/// properly set.
25bool baseInitializerUsesThis(ASTContext &Ctx, const Expr *Init);
26
27} // namespace clang::CodeGenUtils
28
29#endif // LLVM_CLANG_CODEGENUTILS_CLASSUTILS_H
Defines the clang::ASTContext interface.
bool baseInitializerUsesThis(ASTContext &Ctx, const Expr *Init)
Check whether Init uses 'this' in a way which requires the vtable to be properly set.