Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 // Derived types | 46 // Derived types |
| 47 case Type::VectorTyID: | 47 case Type::VectorTyID: |
| 48 Valid = false; | 48 Valid = false; |
| 49 break; | 49 break; |
| 50 case Type::IntegerTyID: | 50 case Type::IntegerTyID: |
| 51 // The check for integer sizes below currently does not pass on | 51 // The check for integer sizes below currently does not pass on |
| 52 // all NaCl tests because some LLVM passes introduce unusual | 52 // all NaCl tests because some LLVM passes introduce unusual |
| 53 // integer sizes. | 53 // integer sizes. |
| 54 // TODO(mseaborn): Re-enable the check when it passes. | 54 // TODO(mseaborn): Re-enable the check when it passes. |
| 55 // See https://code.google.com/p/nativeclient/issues/detail?id=3360 | 55 // See https://code.google.com/p/nativeclient/issues/detail?id=3360 |
| 56 Valid = true; | 56 //Valid = true; |
|
Mark Seaborn
2013/05/06 17:04:06
You'll need to undo this before committing since t
| |
| 57 // Width = cast<const IntegerType>(Ty)->getBitWidth(); | 57 Width = cast<const IntegerType>(Ty)->getBitWidth(); |
| 58 // Valid = (Width == 1 || Width == 8 || Width == 16 || | 58 Valid = (Width == 1 || Width == 8 || Width == 16 || |
| 59 // Width == 32 || Width == 64); | 59 Width == 32 || Width == 64); |
| 60 break; | 60 break; |
| 61 case Type::FunctionTyID: | 61 case Type::FunctionTyID: |
| 62 case Type::StructTyID: | 62 case Type::StructTyID: |
| 63 case Type::ArrayTyID: | 63 case Type::ArrayTyID: |
| 64 case Type::PointerTyID: | 64 case Type::PointerTyID: |
| 65 // These types are valid if their contained or pointed-to types are | 65 // These types are valid if their contained or pointed-to types are |
| 66 // valid. Since struct/pointer subtype relationships may be circular, | 66 // valid. Since struct/pointer subtype relationships may be circular, |
| 67 // mark the current type as valid to avoid infinite recursion | 67 // mark the current type as valid to avoid infinite recursion |
| 68 Valid = true; | 68 Valid = true; |
| 69 VisitedTypes[Ty] = true; | 69 VisitedTypes[Ty] = true; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 for (unsigned i = 0, e = N->getNumOperands(); i != e; i++) { | 127 for (unsigned i = 0, e = N->getNumOperands(); i != e; i++) { |
| 128 if (Value *Op = N->getOperand(i)) { | 128 if (Value *Op = N->getOperand(i)) { |
| 129 if (Type *Invalid = checkTypesInConstant(dyn_cast<Constant>(Op))) { | 129 if (Type *Invalid = checkTypesInConstant(dyn_cast<Constant>(Op))) { |
| 130 VisitedConstants[N] = Invalid; | 130 VisitedConstants[N] = Invalid; |
| 131 return Invalid; | 131 return Invalid; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 return NULL; | 135 return NULL; |
| 136 } | 136 } |
| OLD | NEW |