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 | 8a36502a60326473ec187eaa954e47beab25a8fb (patch) | |
tree | 870e495d25ecd31f373f025e3e21a1adee894187 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 52dd02d8ef35221568f9afd79f4b4f7b7f7bfda5 (diff) | |
download | bcm5719-llvm-8a36502a60326473ec187eaa954e47beab25a8fb.tar.gz bcm5719-llvm-8a36502a60326473ec187eaa954e47beab25a8fb.zip |
[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
llvm-svn: 184763
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 297fc655e44..c6b498cd586 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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; |