blob: dd322a19ec859ae03539e25f4e7dc5f201767797 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001//===--- CodeGenTypes.h - Type translation for LLVM CodeGen -----*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Chris Lattner and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This is the code that handles AST -> LLVM type lowering.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef CODEGEN_CODEGENTYPES_H
15#define CODEGEN_CODEGENTYPES_H
16
17#include <vector>
18
19namespace llvm {
20 class Type;
21}
22
23namespace clang {
24 class TargetInfo;
25 class QualType;
26 class FunctionTypeProto;
27
28namespace CodeGen {
29
30/// CodeGenTypes - This class organizes the cross-module state that is used
31/// while lowering AST types to LLVM types.
32class CodeGenTypes {
33 TargetInfo &Target;
34
35public:
36 CodeGenTypes(TargetInfo &target) : Target(target) {}
37
38 TargetInfo &getTarget() const { return Target; }
39
40 const llvm::Type *ConvertType(QualType T);
41 void DecodeArgumentTypes(const FunctionTypeProto &FTP,
42 std::vector<const llvm::Type*> &ArgTys);
43};
44} // end namespace CodeGen
45} // end namespace clang
46
47#endif