From 8e77b2bb5a22893e5f177997434ed7a529cf1cbc Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 5 Dec 2013 01:23:43 +0000 Subject: Add an AdjustedType sugar node for adjusting calling conventions Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196451 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index c1dc0b3657..ce2c9b05c4 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -1308,6 +1308,10 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) { case Type::ObjCObjectPointer: llvm_unreachable("type class is never variably-modified!"); + case Type::Adjusted: + type = cast(ty)->getAdjustedType(); + break; + case Type::Decayed: type = cast(ty)->getPointeeType(); break; -- cgit v1.2.3