From 7532dc66648cfe7432c9fe66dec5225f0ab301c6 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 30 Mar 2009 22:58:21 +0000 Subject: Improve the representation of template names in the AST. This representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector) is more accurate. Rather than representing std::vector as std::(vector) we represent it as (std::vector) which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenTypes.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/CodeGenTypes.cpp') diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 85d7384c6c..5367c71b2c 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -392,6 +392,9 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { // http://gcc.gnu.org/onlinedocs/gccint/Type-Layout.html#Type-Layout assert(0 && "FIXME: We can't handle member pointers yet."); return llvm::OpaqueType::get(); + + case Type::TemplateSpecialization: + assert(false && "Dependent types can't get here"); } // FIXME: implement. -- cgit v1.2.3