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

Side by Side Diff: src/IceTypeConverter.cpp

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 5 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 /// \file 10 /// \file
11 /// This file implements how to convert LLVM types to ICE types, and ICE types 11 /// This file implements how to convert LLVM types to ICE types, and ICE types
12 /// to LLVM types. 12 /// to LLVM types.
13 /// 13 ///
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #include "IceTypeConverter.h" 16 #include "IceTypeConverter.h"
17 17
18 #pragma clang diagnostic push
19 #pragma clang diagnostic ignored "-Wunused-parameter"
20 #pragma clang diagnostic ignored "-Wshadow"
18 #include "llvm/Support/raw_ostream.h" 21 #include "llvm/Support/raw_ostream.h"
22 #pragma clang diagnostic pop
19 23
20 namespace Ice { 24 namespace Ice {
21 25
22 TypeConverter::TypeConverter(llvm::LLVMContext &Context) { 26 TypeConverter::TypeConverter(llvm::LLVMContext &Context) {
23 addLLVMType(IceType_void, llvm::Type::getVoidTy(Context)); 27 addLLVMType(IceType_void, llvm::Type::getVoidTy(Context));
24 llvm::Type *Type_i1 = llvm::IntegerType::get(Context, 1); 28 llvm::Type *Type_i1 = llvm::IntegerType::get(Context, 1);
25 llvm::Type *Type_i8 = llvm::IntegerType::get(Context, 8); 29 llvm::Type *Type_i8 = llvm::IntegerType::get(Context, 8);
26 llvm::Type *Type_i16 = llvm::IntegerType::get(Context, 16); 30 llvm::Type *Type_i16 = llvm::IntegerType::get(Context, 16);
27 llvm::Type *Type_i32 = llvm::IntegerType::get(Context, 32); 31 llvm::Type *Type_i32 = llvm::IntegerType::get(Context, 32);
28 llvm::Type *Type_f32 = llvm::Type::getFloatTy(Context); 32 llvm::Type *Type_f32 = llvm::Type::getFloatTy(Context);
(...skipping 22 matching lines...) Expand all
51 switch (LLVMTy->getTypeID()) { 55 switch (LLVMTy->getTypeID()) {
52 case llvm::Type::PointerTyID: 56 case llvm::Type::PointerTyID:
53 case llvm::Type::FunctionTyID: 57 case llvm::Type::FunctionTyID:
54 return getPointerType(); 58 return getPointerType();
55 default: 59 default:
56 return Ice::IceType_NUM; 60 return Ice::IceType_NUM;
57 } 61 }
58 } 62 }
59 63
60 } // end of Ice namespace. 64 } // end of Ice namespace.
OLDNEW
« src/IceInst.h ('K') | « src/IceTypeConverter.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698