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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "IceTypes.h" | 21 #include "IceTypes.h" |
22 | 22 |
23 namespace llvm { | 23 namespace llvm { |
24 class LLVMContext; | 24 class LLVMContext; |
25 } // end of llvm namespace. | 25 } // end of llvm namespace. |
26 | 26 |
27 namespace Ice { | 27 namespace Ice { |
28 | 28 |
29 /// Converts LLVM types to ICE types, and ICE types to LLVM types. | 29 /// Converts LLVM types to ICE types, and ICE types to LLVM types. |
30 class TypeConverter { | 30 class TypeConverter { |
31 TypeConverter(const TypeConverter &) LLVM_DELETED_FUNCTION; | 31 TypeConverter(const TypeConverter &) = delete; |
32 TypeConverter &operator=(const TypeConverter &) LLVM_DELETED_FUNCTION; | 32 TypeConverter &operator=(const TypeConverter &) = delete; |
33 | 33 |
34 public: | 34 public: |
35 /// Context is the context to use to build llvm types. | 35 /// Context is the context to use to build llvm types. |
36 TypeConverter(llvm::LLVMContext &Context); | 36 TypeConverter(llvm::LLVMContext &Context); |
37 | 37 |
38 /// Returns the LLVM type for the corresponding ICE type Ty. | 38 /// Returns the LLVM type for the corresponding ICE type Ty. |
39 llvm::Type *convertToLLVMType(Type Ty) const { | 39 llvm::Type *convertToLLVMType(Type Ty) const { |
40 // Note: We use "at" here in case Ty wasn't registered. | 40 // Note: We use "at" here in case Ty wasn't registered. |
41 return LLVMTypes.at(Ty); | 41 return LLVMTypes.at(Ty); |
42 } | 42 } |
(...skipping 27 matching lines...) Expand all Loading... |
70 // Add LLVM/ICE pair to internal tables. | 70 // Add LLVM/ICE pair to internal tables. |
71 void AddLLVMType(Type Ty, llvm::Type *LLVMTy); | 71 void AddLLVMType(Type Ty, llvm::Type *LLVMTy); |
72 | 72 |
73 // Converts types not in LLVM2IceMap. | 73 // Converts types not in LLVM2IceMap. |
74 Type convertToIceTypeOther(llvm::Type *LLVMTy) const; | 74 Type convertToIceTypeOther(llvm::Type *LLVMTy) const; |
75 }; | 75 }; |
76 | 76 |
77 } // end of Ice namespace. | 77 } // end of Ice namespace. |
78 | 78 |
79 #endif // SUBZERO_SRC_ICETYPECONVERTER_H | 79 #endif // SUBZERO_SRC_ICETYPECONVERTER_H |
OLD | NEW |