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

Side by Side Diff: src/IceTargetLowering.h

Issue 814353002: Subzero: Convert NULL->nullptr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Revert crosstest whitespace changes Created 6 years 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/IceRegAlloc.cpp ('k') | src/IceTargetLowering.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 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===//
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 declares the TargetLowering and LoweringContext 10 // This file declares the TargetLowering and LoweringContext
(...skipping 19 matching lines...) Expand all
30 // instructions in a node, and insert new (lowered) instructions at 30 // instructions in a node, and insert new (lowered) instructions at
31 // the current point. Along with the instruction list container and 31 // the current point. Along with the instruction list container and
32 // associated iterators, it holds the current node, which is needed 32 // associated iterators, it holds the current node, which is needed
33 // when inserting new instructions in order to track whether variables 33 // when inserting new instructions in order to track whether variables
34 // are used as single-block or multi-block. 34 // are used as single-block or multi-block.
35 class LoweringContext { 35 class LoweringContext {
36 LoweringContext(const LoweringContext &) = delete; 36 LoweringContext(const LoweringContext &) = delete;
37 LoweringContext &operator=(const LoweringContext &) = delete; 37 LoweringContext &operator=(const LoweringContext &) = delete;
38 38
39 public: 39 public:
40 LoweringContext() : Node(NULL), LastInserted(NULL) {} 40 LoweringContext() : Node(nullptr), LastInserted(nullptr) {}
41 ~LoweringContext() {} 41 ~LoweringContext() {}
42 void init(CfgNode *Node); 42 void init(CfgNode *Node);
43 Inst *getNextInst() const { 43 Inst *getNextInst() const {
44 if (Next == End) 44 if (Next == End)
45 return NULL; 45 return nullptr;
46 return Next; 46 return Next;
47 } 47 }
48 Inst *getNextInst(InstList::iterator &Iter) const { 48 Inst *getNextInst(InstList::iterator &Iter) const {
49 advanceForward(Iter); 49 advanceForward(Iter);
50 if (Iter == End) 50 if (Iter == End)
51 return NULL; 51 return nullptr;
52 return Iter; 52 return Iter;
53 } 53 }
54 CfgNode *getNode() const { return Node; } 54 CfgNode *getNode() const { return Node; }
55 bool atEnd() const { return Cur == End; } 55 bool atEnd() const { return Cur == End; }
56 InstList::iterator getCur() const { return Cur; } 56 InstList::iterator getCur() const { return Cur; }
57 InstList::iterator getNext() const { return Next; } 57 InstList::iterator getNext() const { return Next; }
58 InstList::iterator getEnd() const { return End; } 58 InstList::iterator getEnd() const { return End; }
59 void insert(Inst *Inst); 59 void insert(Inst *Inst);
60 Inst *getLastInserted() const; 60 Inst *getLastInserted() const;
61 void advanceCur() { Cur = Next; } 61 void advanceCur() { Cur = Next; }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 virtual void lower(const VariableDeclaration &Var) = 0; 262 virtual void lower(const VariableDeclaration &Var) = 0;
263 263
264 protected: 264 protected:
265 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 265 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
266 GlobalContext *Ctx; 266 GlobalContext *Ctx;
267 }; 267 };
268 268
269 } // end of namespace Ice 269 } // end of namespace Ice
270 270
271 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 271 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698