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
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 301f693..ff7a20a 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::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) {