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

Side by Side Diff: src/PNaClTranslator.cpp

Issue 830303003: Subzero: Clean up a few areas. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rewrite another loop using reverse_range() Created 5 years, 11 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 | « src/IceTypes.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/IceTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698