diff options
| author | Reid Kleckner <reid@kleckner.net> | 2013-06-24 17:51:48 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2013-06-24 17:51:48 +0000 |
| commit | 12df246d6dea2ee1f92c186f922f1afcf499647a (patch) | |
| tree | 5ec11fdddf2a02522c56ab6a745c4db769efdc9c /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 8d90b4ab994c48c4b6d53122282dc93ac722bfc7 (diff) | |
| download | clang-12df246d6dea2ee1f92c186f922f1afcf499647a.tar.gz clang-12df246d6dea2ee1f92c186f922f1afcf499647a.tar.bz2 clang-12df246d6dea2ee1f92c186f922f1afcf499647a.tar.xz | |
[AST] Introduce a new DecayedType sugar node
The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function type. Ultimately this is necessary to implement
Microsoft's C++ name mangling scheme, which mangles decayed arrays
differently from normal pointers.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1014
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 297fc655e4..c6b498cd58 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -1273,6 +1273,10 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) { case Type::ObjCObjectPointer: llvm_unreachable("type class is never variably-modified!"); + case Type::Decayed: + type = cast<DecayedType>(ty)->getPointeeType(); + break; + case Type::Pointer: type = cast<PointerType>(ty)->getPointeeType(); break; |
