aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index decf539f1c..294965498e 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -14,6 +14,7 @@
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "clang/AST/ASTContext.h"
+#include "clang/AST/DeclObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/Constants.h"
@@ -135,6 +136,7 @@ public:
}
Value *VisitObjCMessageExpr(ObjCMessageExpr *E);
Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E);
+ Value *VisitObjCProtocolExpr(ObjCProtocolExpr *E);
Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { return EmitLoadOfLValue(E);}
Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E);
Value *VisitShuffleVectorExpr(ShuffleVectorExpr *E);
@@ -506,6 +508,11 @@ Value *ScalarExprEmitter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
return Runtime->GetSelector(Builder, E->getSelector());
}
+Value *ScalarExprEmitter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
+ // FIXME: This should pass the Decl not the name.
+ return Runtime->GenerateProtocolRef(Builder, E->getProtocol()->getName());
+}
+
Value *ScalarExprEmitter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
// Emit subscript expressions in rvalue context's. For most cases, this just
// loads the lvalue formed by the subscript expr. However, we have to be