Add initial support for objc codegen for methods, ivars, and the
etoile runtime, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48969 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 509e829..121b795 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -14,6 +14,7 @@
 #ifndef CLANG_CODEGEN_CODEGENFUNCTION_H
 #define CLANG_CODEGEN_CODEGENFUNCTION_H
 
+#include "clang/AST/Type.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/LLVMBuilder.h"
@@ -27,8 +28,8 @@
   class ASTContext;
   class Decl;
   class FunctionDecl;
+  class ObjCMethodDecl;
   class TargetInfo;
-  class QualType;
   class FunctionTypeProto;
   
   class Stmt;
@@ -66,6 +67,7 @@
   class ChooseExpr;
   class PreDefinedExpr;
   class ObjCStringLiteral;
+  class ObjCIvarRefExpr;
   class MemberExpr;
 
   class BlockVarDecl;
@@ -245,6 +247,7 @@
   llvm::LLVMFoldingBuilder Builder;
   
   const FunctionDecl *CurFuncDecl;
+  QualType FnRetTy;
   llvm::Function *CurFn;
 
   /// AllocaInsertPoint - This is an instruction in the entry block before which
@@ -286,6 +289,7 @@
   
   ASTContext &getContext() const;
 
+  void GenerateObjCMethod(const ObjCMethodDecl *OMD);
   void GenerateCode(const FunctionDecl *FD);
   
   const llvm::Type *ConvertType(QualType T);
@@ -422,7 +426,8 @@
 
   LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field,
                             bool isUnion);
-    
+      
+  LValue EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E);
   //===--------------------------------------------------------------------===//
   //                         Scalar Expression Emission
   //===--------------------------------------------------------------------===//