| OLD | NEW |
| 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// | 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// |
| 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 the PNaCl bitcode file to Ice, to machine code | 10 // This file implements the PNaCl bitcode file to Ice, to machine code |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 "allow-pnacl-reader-error-recovery", | 42 "allow-pnacl-reader-error-recovery", |
| 43 cl::desc("Allow error recovery when reading PNaCl bitcode."), | 43 cl::desc("Allow error recovery when reading PNaCl bitcode."), |
| 44 cl::init(false)); | 44 cl::init(false)); |
| 45 | 45 |
| 46 // Models elements in the list of types defined in the types block. | 46 // Models elements in the list of types defined in the types block. |
| 47 // These elements can be undefined, a (simple) type, or a function type | 47 // These elements can be undefined, a (simple) type, or a function type |
| 48 // signature. Note that an extended type is undefined on construction. | 48 // signature. Note that an extended type is undefined on construction. |
| 49 // Use methods setAsSimpleType and setAsFuncSigType to define | 49 // Use methods setAsSimpleType and setAsFuncSigType to define |
| 50 // the extended type. | 50 // the extended type. |
| 51 class ExtendedType { | 51 class ExtendedType { |
| 52 // ExtendedType(const ExtendedType &Ty) = delete; | |
| 53 ExtendedType &operator=(const ExtendedType &Ty) = delete; | 52 ExtendedType &operator=(const ExtendedType &Ty) = delete; |
| 54 public: | 53 public: |
| 55 /// Discriminator for LLVM-style RTTI. | 54 /// Discriminator for LLVM-style RTTI. |
| 56 enum TypeKind { Undefined, Simple, FuncSig }; | 55 enum TypeKind { Undefined, Simple, FuncSig }; |
| 57 | 56 |
| 58 ExtendedType() : Kind(Undefined) {} | 57 ExtendedType() : Kind(Undefined) {} |
| 58 ExtendedType(const ExtendedType &Ty) = default; |
| 59 | 59 |
| 60 virtual ~ExtendedType() {} | 60 virtual ~ExtendedType() {} |
| 61 | 61 |
| 62 ExtendedType::TypeKind getKind() const { return Kind; } | 62 ExtendedType::TypeKind getKind() const { return Kind; } |
| 63 void dump(Ice::Ostream &Stream) const; | 63 void dump(Ice::Ostream &Stream) const; |
| 64 | 64 |
| 65 /// Changes the extended type to a simple type with the given | 65 /// Changes the extended type to a simple type with the given |
| 66 /// value. | 66 /// value. |
| 67 void setAsSimpleType(Ice::Type Ty) { | 67 void setAsSimpleType(Ice::Type Ty) { |
| 68 assert(Kind == Undefined); | 68 assert(Kind == Undefined); |
| (...skipping 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3001 | 3001 |
| 3002 if (TopLevelBlocks != 1) { | 3002 if (TopLevelBlocks != 1) { |
| 3003 errs() << IRFilename | 3003 errs() << IRFilename |
| 3004 << ": Contains more than one module. Found: " << TopLevelBlocks | 3004 << ": Contains more than one module. Found: " << TopLevelBlocks |
| 3005 << "\n"; | 3005 << "\n"; |
| 3006 ErrorStatus = true; | 3006 ErrorStatus = true; |
| 3007 } | 3007 } |
| 3008 } | 3008 } |
| 3009 | 3009 |
| 3010 } // end of namespace Ice | 3010 } // end of namespace Ice |
| OLD | NEW |