summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-05 01:23:43 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-05 01:23:43 +0000
commit8e77b2bb5a22893e5f177997434ed7a529cf1cbc (patch)
treeedea68d06aed577d05cd2a46a354bfeabf7eba7d /lib/CodeGen/CodeGenFunction.cpp
parentb8f3702eecd7d67c458fcee9a399a65128787e64 (diff)
downloadclang-8e77b2bb5a22893e5f177997434ed7a529cf1cbc.tar.gz
clang-8e77b2bb5a22893e5f177997434ed7a529cf1cbc.tar.bz2
clang-8e77b2bb5a22893e5f177997434ed7a529cf1cbc.tar.xz
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp4
1 files changed, 4 insertions, 0 deletions
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<AdjustedType>(ty)->getAdjustedType();
+ break;
+
case Type::Decayed:
type = cast<DecayedType>(ty)->getPointeeType();
break;