OLD | NEW |
1 //===- subzero/src/IceTypeConverter.cpp - Convert ICE/LLVM Types ----------===// | 1 //===- subzero/src/IceTypeConverter.cpp - Convert ICE/LLVM Types ----------===// |
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 implements how to convert LLVM types to ICE types, and ICE types | 10 // This file implements how to convert LLVM types to ICE types, and ICE types |
(...skipping 29 matching lines...) Expand all Loading... |
40 void TypeConverter::addLLVMType(Type Ty, llvm::Type *LLVMTy) { | 40 void TypeConverter::addLLVMType(Type Ty, llvm::Type *LLVMTy) { |
41 assert(static_cast<size_t>(Ty) == LLVMTypes.size()); | 41 assert(static_cast<size_t>(Ty) == LLVMTypes.size()); |
42 LLVMTypes.push_back(LLVMTy); | 42 LLVMTypes.push_back(LLVMTy); |
43 LLVM2IceMap[LLVMTy] = Ty; | 43 LLVM2IceMap[LLVMTy] = Ty; |
44 } | 44 } |
45 | 45 |
46 Type TypeConverter::convertToIceTypeOther(llvm::Type *LLVMTy) const { | 46 Type TypeConverter::convertToIceTypeOther(llvm::Type *LLVMTy) const { |
47 switch (LLVMTy->getTypeID()) { | 47 switch (LLVMTy->getTypeID()) { |
48 case llvm::Type::PointerTyID: | 48 case llvm::Type::PointerTyID: |
49 case llvm::Type::FunctionTyID: | 49 case llvm::Type::FunctionTyID: |
50 return getIcePointerType(); | 50 return getPointerType(); |
51 default: | 51 default: |
52 return Ice::IceType_NUM; | 52 return Ice::IceType_NUM; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 } // end of Ice namespace. | 56 } // end of Ice namespace. |
OLD | NEW |