Refactor some CodeGen functionality: 
 - Add CodeGenFunction::{EmitReturnOfRValue, EmitIvarOffset}
 - Factor EmitLValueForIvar out of EmitObjCIvarRefLValue.

No non-error functionality change (some unsupported errors are
degraded to asserts for the time being).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56543 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index fee9e6f..36130cf 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -40,6 +40,8 @@
   class FunctionDecl;
   class FunctionTypeProto;
   class LabelStmt;
+  class ObjCInterfaceDecl;
+  class ObjCIvarDecl;
   class ObjCMethodDecl;
   class ObjCPropertyImplDecl;
   class TargetInfo;
@@ -334,9 +336,13 @@
   LValue EmitMemberExpr(const MemberExpr *E);
   LValue EmitCompoundLiteralLValue(const CompoundLiteralExpr *E);
 
+  llvm::Value *EmitIvarOffset(ObjCInterfaceDecl *Interface,
+                              const ObjCIvarDecl *Ivar);
   LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field,
                             bool isUnion, unsigned CVRQualifiers);
-      
+  LValue EmitLValueForIvar(llvm::Value* Base, const ObjCIvarDecl *Ivar,
+                           unsigned CVRQualifiers);
+
   LValue EmitCXXConditionDeclLValue(const CXXConditionDeclExpr *E);
 
   LValue EmitObjCMessageExprLValue(const ObjCMessageExpr *E);
@@ -442,6 +448,8 @@
   /// instructions in IndirectSwitches.
   void EmitIndirectSwitches();
 
+  void EmitReturnOfRValue(RValue RV, QualType Ty);
+
   /// ExpandTypeFromArgs - Reconstruct a structure of type \arg Ty
   /// from function arguments into \arg Dst. See ABIArgInfo::Expand.
   ///