1 //===-- TaggedASTType.h -----------------------------------------*- 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 #ifndef liblldb_TaggedASTType_h_
11 #define liblldb_TaggedASTType_h_
13 #include "lldb/Symbol/CompilerType.h"
15 namespace lldb_private {
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 {
21 TaggedASTType(const CompilerType &compiler_type)
22 : CompilerType(compiler_type) {}
24 TaggedASTType(lldb::opaque_compiler_type_t type, TypeSystem *type_system)
25 : CompilerType(type_system, type) {}
27 TaggedASTType(const TaggedASTType<C> &tw) : CompilerType(tw) {}
29 TaggedASTType() : CompilerType() {}
31 virtual ~TaggedASTType() {}
33 TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
34 CompilerType::operator=(tw);
39 // Commonly-used tagged types, so code using them is interoperable
40 typedef TaggedASTType<0> TypeFromParser;
41 typedef TaggedASTType<1> TypeFromUser;