Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Side by Side Diff: src/IceTypeConverter.cpp

Issue 622443002: Subzero: Change llvm::OwningPtr to C++11's std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove ErrorOr for now Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 // to LLVM types. 11 // to LLVM types.
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "llvm/Support/raw_ostream.h"
16
15 #include "IceTypeConverter.h" 17 #include "IceTypeConverter.h"
16 #include "llvm/Support/raw_ostream.h"
17 18
18 namespace Ice { 19 namespace Ice {
19 20
20 TypeConverter::TypeConverter(llvm::LLVMContext &Context) { 21 TypeConverter::TypeConverter(llvm::LLVMContext &Context) {
21 AddLLVMType(IceType_void, llvm::Type::getVoidTy(Context)); 22 AddLLVMType(IceType_void, llvm::Type::getVoidTy(Context));
22 AddLLVMType(IceType_i1, llvm::IntegerType::get(Context, 1)); 23 AddLLVMType(IceType_i1, llvm::IntegerType::get(Context, 1));
23 AddLLVMType(IceType_i8, llvm::IntegerType::get(Context, 8)); 24 AddLLVMType(IceType_i8, llvm::IntegerType::get(Context, 8));
24 AddLLVMType(IceType_i16, llvm::IntegerType::get(Context, 16)); 25 AddLLVMType(IceType_i16, llvm::IntegerType::get(Context, 16));
25 AddLLVMType(IceType_i32, llvm::IntegerType::get(Context, 32)); 26 AddLLVMType(IceType_i32, llvm::IntegerType::get(Context, 32));
26 AddLLVMType(IceType_i64, llvm::IntegerType::get(Context, 64)); 27 AddLLVMType(IceType_i64, llvm::IntegerType::get(Context, 64));
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (Size == 4) 100 if (Size == 4)
100 return convertToLLVMType(IceType_v4f32); 101 return convertToLLVMType(IceType_v4f32);
101 break; 102 break;
102 default: 103 default:
103 break; 104 break;
104 } 105 }
105 return NULL; 106 return NULL;
106 } 107 }
107 108
108 } // end of Ice namespace. 109 } // end of Ice namespace.
OLDNEW
« no previous file with comments | « src/IceTypeConverter.h ('k') | src/PNaClTranslator.h » ('j') | src/PNaClTranslator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698