summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0503a870a94c28ab32fa461e175f8cb387c8718e (patch)
treefa28b29965ee5c660e774fb67830aa8fd3b73e57 /clang/lib/CodeGen/CodeGenFunction.cpp
parentd33ff74b196c38ff414773d39899514a9c9dd8ed (diff)
downloadbcm5719-llvm-0503a870a94c28ab32fa461e175f8cb387c8718e.tar.gz
bcm5719-llvm-0503a870a94c28ab32fa461e175f8cb387c8718e.zip
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 llvm-svn: 196451
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index c1dc0b3657f..ce2c9b05c47 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud