Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | //===--- 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 | |
| 19 | namespace llvm { |
| 20 | class Type; |
| 21 | } |
| 22 | |
| 23 | namespace clang { |
| 24 | class TargetInfo; |
| 25 | class QualType; |
| 26 | class FunctionTypeProto; |
| 27 | |
| 28 | namespace CodeGen { |
| 29 | |
| 30 | /// CodeGenTypes - This class organizes the cross-module state that is used |
| 31 | /// while lowering AST types to LLVM types. |
| 32 | class CodeGenTypes { |
| 33 | TargetInfo &Target; |
| 34 | |
| 35 | public: |
| 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 |