2007-05-28 09:07:47 +08:00
|
|
|
//===--- CodeGenFunction.h - Per-Function state for LLVM CodeGen ----------===//
|
2007-05-24 14:29:05 +08:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2007-05-28 09:07:47 +08:00
|
|
|
// This is the internal per-function state used for llvm translation.
|
2007-05-24 14:29:05 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2007-05-28 09:07:47 +08:00
|
|
|
#ifndef CODEGEN_CODEGENFUNCTION_H
|
|
|
|
#define CODEGEN_CODEGENFUNCTION_H
|
2007-05-24 14:29:05 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class Module;
|
2007-05-30 07:17:50 +08:00
|
|
|
class Type;
|
2007-05-24 14:29:05 +08:00
|
|
|
namespace clang {
|
|
|
|
class ASTContext;
|
|
|
|
class FunctionDecl;
|
2007-05-30 07:17:50 +08:00
|
|
|
class QualType;
|
|
|
|
class SourceLocation;
|
|
|
|
class TargetInfo;
|
2007-05-28 09:07:47 +08:00
|
|
|
|
2007-05-24 14:29:05 +08:00
|
|
|
namespace CodeGen {
|
2007-05-28 09:07:47 +08:00
|
|
|
class CodeGenModule;
|
2007-05-24 14:29:05 +08:00
|
|
|
|
2007-05-28 09:07:47 +08:00
|
|
|
/// CodeGenFunction - This class organizes the per-function state that is used
|
|
|
|
/// while generating LLVM code.
|
|
|
|
class CodeGenFunction {
|
|
|
|
CodeGenModule &CGM; // Per-module state.
|
2007-05-30 07:17:50 +08:00
|
|
|
TargetInfo &Target;
|
2007-05-28 09:07:47 +08:00
|
|
|
public:
|
2007-05-30 07:17:50 +08:00
|
|
|
CodeGenFunction(CodeGenModule &cgm);
|
2007-05-24 14:29:05 +08:00
|
|
|
|
2007-05-30 07:17:50 +08:00
|
|
|
const llvm::Type *ConvertType(QualType T, SourceLocation Loc);
|
|
|
|
|
|
|
|
void GenerateCode(FunctionDecl *FD);
|
2007-05-24 14:29:05 +08:00
|
|
|
};
|
|
|
|
} // end namespace CodeGen
|
|
|
|
} // end namespace clang
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|