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

Side by Side Diff: lib/Analysis/NaCl/PNaClABITypeChecker.cpp

Issue 14840018: Fix some build warnings in Nacl-specific code (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | lib/Transforms/NaCl/PromoteIntegers.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- PNaClABICheckTypes.h - Verify PNaCl ABI rules --------===// 1 //===- PNaClABICheckTypes.h - Verify PNaCl ABI rules --------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
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 // Common type-checking code for module and function-level passes 10 // Common type-checking code for module and function-level passes
11 // 11 //
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "PNaClABITypeChecker.h" 15 #include "PNaClABITypeChecker.h"
16 #include "llvm/IR/Constant.h" 16 #include "llvm/IR/Constant.h"
17 #include "llvm/IR/Constants.h" 17 #include "llvm/IR/Constants.h"
18 #include "llvm/IR/DerivedTypes.h" 18 #include "llvm/IR/DerivedTypes.h"
19 #include "llvm/IR/Metadata.h" 19 #include "llvm/IR/Metadata.h"
20 20
21 using namespace llvm; 21 using namespace llvm;
22 22
23 bool PNaClABITypeChecker::isValidType(const Type *Ty) { 23 bool PNaClABITypeChecker::isValidType(const Type *Ty) {
24 if (VisitedTypes.count(Ty)) 24 if (VisitedTypes.count(Ty))
25 return VisitedTypes[Ty]; 25 return VisitedTypes[Ty];
26 26
27 unsigned Width;
Derek Schuff 2013/05/14 18:40:04 this is used by the commented-out block in case Ty
eliben 2013/05/14 19:23:38 Done.
28 bool Valid = false; 27 bool Valid = false;
29 switch (Ty->getTypeID()) { 28 switch (Ty->getTypeID()) {
30 // Allowed primitive types 29 // Allowed primitive types
31 case Type::VoidTyID: 30 case Type::VoidTyID:
32 case Type::FloatTyID: 31 case Type::FloatTyID:
33 case Type::DoubleTyID: 32 case Type::DoubleTyID:
34 case Type::LabelTyID: 33 case Type::LabelTyID:
35 case Type::MetadataTyID: 34 case Type::MetadataTyID:
36 Valid = true; 35 Valid = true;
37 break; 36 break;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 for (unsigned i = 0, e = N->getNumOperands(); i != e; i++) { 126 for (unsigned i = 0, e = N->getNumOperands(); i != e; i++) {
128 if (Value *Op = N->getOperand(i)) { 127 if (Value *Op = N->getOperand(i)) {
129 if (Type *Invalid = checkTypesInConstant(dyn_cast<Constant>(Op))) { 128 if (Type *Invalid = checkTypesInConstant(dyn_cast<Constant>(Op))) {
130 VisitedConstants[N] = Invalid; 129 VisitedConstants[N] = Invalid;
131 return Invalid; 130 return Invalid;
132 } 131 }
133 } 132 }
134 } 133 }
135 return NULL; 134 return NULL;
136 } 135 }
OLDNEW
« no previous file with comments | « no previous file | lib/Transforms/NaCl/PromoteIntegers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698