summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenFunction.h
blob: e7b1a05ebcc29d0bb638fd523c2a59b718af8141 (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
//===--- CodeGenFunction.h - Per-Function state for LLVM CodeGen ----------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file was developed by Chris Lattner and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This is the internal per-function state used for llvm translation. 
//
//===----------------------------------------------------------------------===//

#ifndef CODEGEN_CODEGENFUNCTION_H
#define CODEGEN_CODEGENFUNCTION_H

namespace llvm {
  class Module;
  class Type;
namespace clang {
  class ASTContext;
  class FunctionDecl;
  class QualType;
  class SourceLocation;
  class TargetInfo;
  
namespace CodeGen {
  class CodeGenModule;
  
/// CodeGenFunction - This class organizes the per-function state that is used
/// while generating LLVM code.
class CodeGenFunction {
  CodeGenModule &CGM;  // Per-module state.
  TargetInfo &Target;
public:
  CodeGenFunction(CodeGenModule &cgm);
  
  const llvm::Type *ConvertType(QualType T, SourceLocation Loc);
  
  void GenerateCode(FunctionDecl *FD);
};
}  // end namespace CodeGen
}  // end namespace clang
}  // end namespace llvm

#endif
OpenPOWER on IntegriCloud