summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCRuntime.h
blob: d8fc60f99c0b46f6c47843ff95f9695e32bcbd90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//===----- CGObjCRuntime.h - Emit LLVM Code from ASTs for a Module --------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This provides an abstract class for Objective-C code generation.  Concrete
// subclasses of this implement code generation for specific Objective-C
// runtime libraries.
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_CODEGEN_OBCJRUNTIME_H
#define CLANG_CODEGEN_OBCJRUNTIME_H

namespace llvm {
  class LLVMFoldingBuilder;
  class Constant;
  class Type;
  class Value;
  class Module;
}

namespace clang {
namespace CodeGen {

// Implements runtime-specific code generation functions
class CGObjCRuntime {
public:
  virtual ~CGObjCRuntime();
  
  // Generate an Objective-C message send operation
  virtual llvm::Value *generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
                                           const llvm::Type *ReturnTy,
                                           llvm::Value *Receiver,
                                           llvm::Constant *Selector,
                                           llvm::Value** ArgV,
                                           unsigned ArgC) = 0;
};

CGObjCRuntime *CreateObjCRuntime(llvm::Module &M);
}
}
#endif
OpenPOWER on IntegriCloud