LLDB mainline
TaggedASTType.h
Go to the documentation of this file.
1//===-- TaggedASTType.h -----------------------------------------*- 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#ifndef LLDB_SYMBOL_TAGGEDASTTYPE_H
10#define LLDB_SYMBOL_TAGGEDASTTYPE_H
11
13
14namespace lldb_private {
15
16// For cases in which there are multiple classes of types that are not
17// interchangeable, to allow static type checking.
18template <unsigned int C> class TaggedASTType : public CompilerType {
19public:
20 TaggedASTType(const CompilerType &compiler_type)
21 : CompilerType(compiler_type) {}
22
24 lldb::TypeSystemWP type_system)
25 : CompilerType(type_system, type) {}
26
28
30
31 virtual ~TaggedASTType() = default;
32
35 return *this;
36 }
37};
38
39// Commonly-used tagged types, so code using them is interoperable
42}
43
44#endif
const CompilerType & operator=(const CompilerType &rhs)
Operators.
CompilerType(lldb::TypeSystemWP type_system, lldb::opaque_compiler_type_t type)
Creates a CompilerType with the given TypeSystem and opaque compiler type.
TaggedASTType(lldb::opaque_compiler_type_t type, lldb::TypeSystemWP type_system)
TaggedASTType< C > & operator=(const TaggedASTType< C > &tw)
TaggedASTType(const TaggedASTType< C > &tw)
TaggedASTType(const CompilerType &compiler_type)
virtual ~TaggedASTType()=default
A class that represents a running process on the host machine.
TaggedASTType< 0 > TypeFromParser
TaggedASTType< 1 > TypeFromUser
void * opaque_compiler_type_t
Definition lldb-types.h:89
std::weak_ptr< lldb_private::TypeSystem > TypeSystemWP