From af2f62ce32e462f256855cd24b06dec4755d2827 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 13 Aug 2008 00:59:25 +0000 Subject: Change ObjCRuntime GenerateProtocol[Ref] methods to take ObjCProtocolDecl directly. Implement CodeGen support for forward protocol decls (no-ops are so nice to implement). Also moved CGObjCRuntime.h out of CodeGenModule.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 301f693548..ff7a20aea7 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -13,6 +13,7 @@ #include "CodeGenFunction.h" #include "CodeGenModule.h" +#include "CGObjCRuntime.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/StmtVisitor.h" @@ -509,7 +510,7 @@ Value *ScalarExprEmitter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) { Value *ScalarExprEmitter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) { // FIXME: This should pass the Decl not the name. - return Runtime->GenerateProtocolRef(Builder, E->getProtocol()->getName()); + return Runtime->GenerateProtocolRef(Builder, E->getProtocol()); } Value *ScalarExprEmitter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) { -- cgit v1.2.3