]> granicus.if.org Git - clang/blob - CodeGen/CGObjCRuntime.h
Add codegen support for ObjC message expressions with the GNU runtime.
[clang] / CodeGen / CGObjCRuntime.h
1 //===----- CGObjCRuntime.h - Emit LLVM Code from ASTs for a Module --------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This provides an abstract class for Objective-C code generation.  Concrete
11 // subclasses of this implement code generation for specific Objective-C
12 // runtime libraries.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef CLANG_CODEGEN_OBCJRUNTIME_H
17 #define CLANG_CODEGEN_OBCJRUNTIME_H
18
19 namespace llvm {
20   class LLVMFoldingBuilder;
21   class Constant;
22   class Type;
23   class Value;
24   class Module;
25 }
26
27 namespace clang {
28 namespace CodeGen {
29
30 // Implements runtime-specific code generation functions
31 class CGObjCRuntime {
32 public:
33   virtual ~CGObjCRuntime();
34   
35   // Generate an Objective-C message send operation
36   virtual llvm::Value *generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
37                                            const llvm::Type *ReturnTy,
38                                            llvm::Value *Receiver,
39                                            llvm::Constant *Selector,
40                                            llvm::Value** ArgV,
41                                            unsigned ArgC) = 0;
42 };
43
44 CGObjCRuntime *CreateObjCRuntime(llvm::Module &M);
45 }
46 }
47 #endif