2007-06-16 08:12:05 +08:00
|
|
|
//===--- CodeGenTypes.h - Type translation for LLVM CodeGen -----*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// 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 code that handles AST -> LLVM type lowering.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CODEGEN_CODEGENTYPES_H
|
|
|
|
#define CODEGEN_CODEGENTYPES_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class Type;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace clang {
|
2007-07-14 09:29:45 +08:00
|
|
|
class ASTContext;
|
2007-06-16 08:12:05 +08:00
|
|
|
class TargetInfo;
|
|
|
|
class QualType;
|
|
|
|
class FunctionTypeProto;
|
|
|
|
|
|
|
|
namespace CodeGen {
|
|
|
|
|
|
|
|
/// CodeGenTypes - This class organizes the cross-module state that is used
|
|
|
|
/// while lowering AST types to LLVM types.
|
|
|
|
class CodeGenTypes {
|
2007-07-14 09:29:45 +08:00
|
|
|
ASTContext &Context;
|
2007-06-16 08:12:05 +08:00
|
|
|
TargetInfo &Target;
|
|
|
|
|
|
|
|
public:
|
2007-07-14 09:29:45 +08:00
|
|
|
CodeGenTypes(ASTContext &Ctx);
|
2007-06-16 08:12:05 +08:00
|
|
|
|
|
|
|
TargetInfo &getTarget() const { return Target; }
|
|
|
|
|
2007-06-23 03:05:19 +08:00
|
|
|
const llvm::Type *ConvertType(QualType T);
|
2007-06-16 08:12:05 +08:00
|
|
|
void DecodeArgumentTypes(const FunctionTypeProto &FTP,
|
2007-06-23 03:05:19 +08:00
|
|
|
std::vector<const llvm::Type*> &ArgTys);
|
2007-06-16 08:12:05 +08:00
|
|
|
};
|
2007-07-14 06:13:22 +08:00
|
|
|
|
2007-06-16 08:12:05 +08:00
|
|
|
} // end namespace CodeGen
|
|
|
|
} // end namespace clang
|
|
|
|
|
|
|
|
#endif
|