summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-07 08:22:57 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-07 08:22:57 +0000
commit319963434cab037c9fabf7d631816d3eaf5bfc1d (patch)
tree51089b4e3f62260bc84aafbe72e10dc2e382339a /clang/lib/CodeGen/CGExprAgg.cpp
parent5ddaab1789d7a7ac6bee56b75ec6f44184d66e8b (diff)
downloadbcm5719-llvm-319963434cab037c9fabf7d631816d3eaf5bfc1d.tar.gz
bcm5719-llvm-319963434cab037c9fabf7d631816d3eaf5bfc1d.zip
Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. llvm-svn: 129065
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index eb64996bd33..75e3a7879d4 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -309,6 +309,10 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
case CK_LValueBitCast:
llvm_unreachable("should not be emitting lvalue bitcast as rvalue");
break;
+
+ case CK_ResolveUnknownAnyType:
+ EmitAggLoadOfLValue(E);
+ break;
case CK_Dependent:
case CK_BitCast:
OpenPOWER on IntegriCloud