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 
14 namespace lldb_private {
15 
16 // For cases in which there are multiple classes of types that are not
17 // interchangeable, to allow static type checking.
18 template <unsigned int C> class TaggedASTType : public CompilerType {
19 public:
20  TaggedASTType(const CompilerType &compiler_type)
21  : CompilerType(compiler_type) {}
22 
24  : CompilerType(type_system, type) {}
25 
27 
29 
30  virtual ~TaggedASTType() = default;
31 
34  return *this;
35  }
36 };
37 
38 // Commonly-used tagged types, so code using them is interoperable
41 }
42 
43 #endif
lldb_private::TaggedASTType::TaggedASTType
TaggedASTType(lldb::opaque_compiler_type_t type, TypeSystem *type_system)
Definition: TaggedASTType.h:23
lldb_private::TaggedASTType::TaggedASTType
TaggedASTType()
Definition: TaggedASTType.h:28
lldb_private::TypeFromUser
TaggedASTType< 1 > TypeFromUser
Definition: TaggedASTType.h:40
lldb_private::TaggedASTType::~TaggedASTType
virtual ~TaggedASTType()=default
lldb_private::TaggedASTType
Definition: TaggedASTType.h:18
lldb_private::CompilerType::operator=
const CompilerType & operator=(const CompilerType &rhs)
Operators.
Definition: CompilerType.h:53
lldb_private::TypeFromParser
TaggedASTType< 0 > TypeFromParser
Definition: TaggedASTType.h:39
lldb_private::TaggedASTType::operator=
TaggedASTType< C > & operator=(const TaggedASTType< C > &tw)
Definition: TaggedASTType.h:32
lldb_private::TaggedASTType::TaggedASTType
TaggedASTType(const TaggedASTType< C > &tw)
Definition: TaggedASTType.h:26
CompilerType.h
lldb_private::TaggedASTType::TaggedASTType
TaggedASTType(const CompilerType &compiler_type)
Definition: TaggedASTType.h:20
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::TypeSystem
Interface for representing a type system.
Definition: TypeSystem.h:71
lldb::opaque_compiler_type_t
void * opaque_compiler_type_t
Definition: lldb-types.h:90