| OLD | NEW |
| 1 //===- subzero/src/IceTypeConverter.h - Convert ICE/LLVM Types --*- C++ -*-===// | 1 //===- subzero/src/IceTypeConverter.h - Convert ICE/LLVM Types --*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines how to convert LLVM types to ICE types, and ICE types | 10 // This file defines how to convert LLVM types to ICE types, and ICE types |
| 11 // to LLVM types. | 11 // to LLVM types. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICETYPECONVERTER_H | 15 #ifndef SUBZERO_SRC_ICETYPECONVERTER_H |
| 16 #define SUBZERO_SRC_ICETYPECONVERTER_H | 16 #define SUBZERO_SRC_ICETYPECONVERTER_H |
| 17 | 17 |
| 18 #include "llvm/IR/DerivedTypes.h" | |
| 19 | |
| 20 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 21 #include "IceTypes.h" | 19 #include "IceTypes.h" |
| 20 #include "llvm/IR/DerivedTypes.h" |
| 22 | 21 |
| 23 namespace llvm { | 22 namespace llvm { |
| 24 class LLVMContext; | 23 class LLVMContext; |
| 25 } // end of llvm namespace. | 24 } // end of namespace llvm |
| 26 | 25 |
| 27 namespace Ice { | 26 namespace Ice { |
| 28 | 27 |
| 29 /// Converts LLVM types to ICE types, and ICE types to LLVM types. | 28 /// Converts LLVM types to ICE types, and ICE types to LLVM types. |
| 30 class TypeConverter { | 29 class TypeConverter { |
| 31 TypeConverter() = delete; | 30 TypeConverter() = delete; |
| 32 TypeConverter(const TypeConverter &) = delete; | 31 TypeConverter(const TypeConverter &) = delete; |
| 33 TypeConverter &operator=(const TypeConverter &) = delete; | 32 TypeConverter &operator=(const TypeConverter &) = delete; |
| 34 | 33 |
| 35 public: | 34 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 49 // The mapping from LLVM types to corresopnding Ice types. | 48 // The mapping from LLVM types to corresopnding Ice types. |
| 50 std::map<llvm::Type *, Type> LLVM2IceMap; | 49 std::map<llvm::Type *, Type> LLVM2IceMap; |
| 51 | 50 |
| 52 // Add LLVM/ICE pair to internal tables. | 51 // Add LLVM/ICE pair to internal tables. |
| 53 void addLLVMType(Type Ty, llvm::Type *LLVMTy); | 52 void addLLVMType(Type Ty, llvm::Type *LLVMTy); |
| 54 | 53 |
| 55 // Converts types not in LLVM2IceMap. | 54 // Converts types not in LLVM2IceMap. |
| 56 Type convertToIceTypeOther(llvm::Type *LLVMTy) const; | 55 Type convertToIceTypeOther(llvm::Type *LLVMTy) const; |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // end of Ice namespace. | 58 } // end of namespace Ice |
| 60 | 59 |
| 61 #endif // SUBZERO_SRC_ICETYPECONVERTER_H | 60 #endif // SUBZERO_SRC_ICETYPECONVERTER_H |
| OLD | NEW |