]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Symbol/TaggedASTType.h
Update to Zstandard 1.3.8
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Symbol / TaggedASTType.h
1 //===-- TaggedASTType.h -----------------------------------------*- 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 #ifndef liblldb_TaggedASTType_h_
11 #define liblldb_TaggedASTType_h_
12
13 #include "lldb/Symbol/CompilerType.h"
14
15 namespace lldb_private {
16
17 // For cases in which there are multiple classes of types that are not
18 // interchangeable, to allow static type checking.
19 template <unsigned int C> class TaggedASTType : public CompilerType {
20 public:
21   TaggedASTType(const CompilerType &compiler_type)
22       : CompilerType(compiler_type) {}
23
24   TaggedASTType(lldb::opaque_compiler_type_t type, TypeSystem *type_system)
25       : CompilerType(type_system, type) {}
26
27   TaggedASTType(const TaggedASTType<C> &tw) : CompilerType(tw) {}
28
29   TaggedASTType() : CompilerType() {}
30
31   virtual ~TaggedASTType() {}
32
33   TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
34     CompilerType::operator=(tw);
35     return *this;
36   }
37 };
38
39 // Commonly-used tagged types, so code using them is interoperable
40 typedef TaggedASTType<0> TypeFromParser;
41 typedef TaggedASTType<1> TypeFromUser;
42 }
43
44 #endif