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

Unified Diff: src/IceGlobalContext.cpp

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/IceGlobalContext.h ('k') | src/IceGlobalInits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 9a3bedd90cafb91be26cb0647d8d26ca5c856e87..187ebd5368d16c0972620f0ebca2af6b1985ce5a 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -120,7 +120,7 @@ template <Type Ty, typename KeyType, typename ValueType> class TypePool {
TypePool &operator=(const TypePool &) = delete;
public:
- TypePool() : NextPoolID(0) {}
+ TypePool() = default;
ValueType *getOrAdd(GlobalContext *Ctx, KeyType Key) {
auto Iter = Pool.find(Key);
if (Iter != Pool.end())
@@ -152,7 +152,7 @@ private:
typedef std::unordered_map<KeyType, ValueType *, std::hash<KeyType>,
KeyCompare<KeyType>> ContainerType;
ContainerType Pool;
- uint32_t NextPoolID;
+ uint32_t NextPoolID = 0;
};
// UndefPool maps ICE types to the corresponding ConstantUndef values.
@@ -161,7 +161,7 @@ class UndefPool {
UndefPool &operator=(const UndefPool &) = delete;
public:
- UndefPool() : NextPoolID(0), Pool(IceType_NUM) {}
+ UndefPool() : Pool(IceType_NUM) {}
ConstantUndef *getOrAdd(GlobalContext *Ctx, Type Ty) {
if (Pool[Ty] == nullptr)
@@ -170,7 +170,7 @@ public:
}
private:
- uint32_t NextPoolID;
+ uint32_t NextPoolID = 0;
std::vector<ConstantUndef *> Pool;
};
@@ -183,7 +183,7 @@ class ConstantPool {
ConstantPool &operator=(const ConstantPool &) = delete;
public:
- ConstantPool() {}
+ ConstantPool() = default;
TypePool<IceType_f32, float, ConstantFloat> Floats;
TypePool<IceType_f64, double, ConstantDouble> Doubles;
TypePool<IceType_i1, int8_t, ConstantInteger32> Integers1;
@@ -224,9 +224,7 @@ GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
// EmitQ is allowed unlimited size.
EmitQ(/*Sequential=*/Flags.isSequential()),
DataLowering(TargetDataLowering::createLowering(this)),
- HasSeenCode(false),
- ProfileBlockInfoVarDecl(VariableDeclaration::create()),
- RandomizationCookie(0) {
+ ProfileBlockInfoVarDecl(VariableDeclaration::create()) {
assert(OsDump && "OsDump is not defined for GlobalContext");
assert(OsEmit && "OsEmit is not defined for GlobalContext");
assert(OsError && "OsError is not defined for GlobalContext");
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceGlobalInits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698