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

Unified Diff: src/IceTargetLowering.h

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceRegAlloc.h ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 8ce2c2feef12b66b4aafcc015af574ef91d94596..205e57341429c939e08bd3efa048d8de4152a7eb 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -39,8 +39,8 @@ class LoweringContext {
LoweringContext &operator=(const LoweringContext &) = delete;
public:
- LoweringContext() : Node(nullptr), LastInserted(nullptr) {}
- ~LoweringContext() {}
+ LoweringContext() = default;
+ ~LoweringContext() = default;
void init(CfgNode *Node);
Inst *getNextInst() const {
if (Next == End)
@@ -67,8 +67,8 @@ public:
private:
// Node is the argument to Inst::updateVars().
- CfgNode *Node;
- Inst *LastInserted;
+ CfgNode *Node = nullptr;
+ Inst *LastInserted = nullptr;
// Cur points to the current instruction being considered. It is
// guaranteed to point to a non-deleted instruction, or to be End.
InstList::iterator Cur;
@@ -226,7 +226,7 @@ public:
virtual void addProlog(CfgNode *Node) = 0;
virtual void addEpilog(CfgNode *Node) = 0;
- virtual ~TargetLowering() {}
+ virtual ~TargetLowering() = default;
protected:
explicit TargetLowering(Cfg *Func);
@@ -323,12 +323,12 @@ protected:
Cfg *Func;
GlobalContext *Ctx;
- bool HasComputedFrame;
- bool CallsReturnsTwice;
+ bool HasComputedFrame = false;
+ bool CallsReturnsTwice = false;
// StackAdjustment keeps track of the current stack offset from its
// natural location, as arguments are pushed for a function call.
- int32_t StackAdjustment;
- SizeT NextLabelNumber;
+ int32_t StackAdjustment = 0;
+ SizeT NextLabelNumber = 0;
LoweringContext Context;
// Runtime helper function names
@@ -366,7 +366,7 @@ protected:
const static constexpr char *H_urem_i64 = "__umoddi3";
private:
- int32_t SnapshotStackAdjustment;
+ int32_t SnapshotStackAdjustment = 0;
};
// TargetDataLowering is used for "lowering" data including initializers
« no previous file with comments | « src/IceRegAlloc.h ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698