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

Unified Diff: src/IceOperand.h

Issue 1343843003: Refactor all instances of `typedef y x` to the C++11 `using x = y` syntax. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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/IceIntrinsics.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 64ce01d5e9eda9e9b8fa0a291a0b0631471f24e5..8bec48e599e88938319d499148cdbf1181e1a98e 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -159,7 +159,7 @@ class ConstantPrimitive : public Constant {
ConstantPrimitive &operator=(const ConstantPrimitive &) = delete;
public:
- typedef T PrimType;
+ using PrimType = T;
static ConstantPrimitive *create(GlobalContext *Ctx, Type Ty, PrimType Value,
uint32_t PoolEntryID) {
@@ -192,10 +192,10 @@ private:
const PrimType Value;
};
-typedef ConstantPrimitive<int32_t, Operand::kConstInteger32> ConstantInteger32;
-typedef ConstantPrimitive<int64_t, Operand::kConstInteger64> ConstantInteger64;
-typedef ConstantPrimitive<float, Operand::kConstFloat> ConstantFloat;
-typedef ConstantPrimitive<double, Operand::kConstDouble> ConstantDouble;
+using ConstantInteger32 = ConstantPrimitive<int32_t, Operand::kConstInteger32>;
+using ConstantInteger64 = ConstantPrimitive<int64_t, Operand::kConstInteger64>;
+using ConstantFloat = ConstantPrimitive<float, Operand::kConstFloat>;
+using ConstantDouble = ConstantPrimitive<double, Operand::kConstDouble>;
template <>
inline void ConstantInteger32::dump(const Cfg *, Ostream &Str) const {
@@ -387,10 +387,10 @@ public:
void dump(Ostream &Str) const;
private:
- typedef std::pair<InstNumberT, InstNumberT> RangeElementType;
+ using RangeElementType = std::pair<InstNumberT, InstNumberT>;
/// RangeType is arena-allocated from the Cfg's allocator.
- typedef std::vector<RangeElementType, CfgLocalAllocator<RangeElementType>>
- RangeType;
+ using RangeType =
+ std::vector<RangeElementType, CfgLocalAllocator<RangeElementType>>;
RangeType Range;
/// TrimmedBegin is an optimization for the overlaps() computation.
/// Since the linear-scan algorithm always calls it as overlaps(Cur)
@@ -560,7 +560,7 @@ enum MetadataKind {
VMK_SingleDefs, /// Track uses+defs, but only record single def
VMK_All /// Track uses+defs, including full def list
};
-typedef std::vector<const Inst *, CfgLocalAllocator<const Inst *>> InstDefList;
+using InstDefList = std::vector<const Inst *, CfgLocalAllocator<const Inst *>>;
/// VariableTracking tracks the metadata for a single variable. It is
/// only meant to be used internally by VariablesMetadata.
« no previous file with comments | « src/IceIntrinsics.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698