Subzero: Improve class definition hygiene.
Delete zero-argument ctor where possible.
Delete default copy ctor and default assignment operator where possible (some were missed in the past).
(The above are not done to the cross tests because we aren't yet building them with C++11.)
Declare single-argument ctor as "explicit".
BUG= none
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/952953002
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 32102df..4237e16 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -748,7 +748,7 @@
// A spill slot linked to a variable with a stack slot should reuse
// that stack slot.
if (SpillVariable *SpillVar = llvm::dyn_cast<SpillVariable>(Var)) {
- assert(Var->getWeight() == RegWeight::Zero);
+ assert(Var->getWeight().isZero());
if (!SpillVar->getLinkedTo()->hasReg()) {
VariablesLinkedToSpillSlots.push_back(Var);
continue;
@@ -4336,7 +4336,7 @@
Variable *Slot,
uint32_t Offset) {
// Ensure that Loc is a stack slot.
- assert(Slot->getWeight() == RegWeight::Zero);
+ assert(Slot->getWeight().isZero());
assert(Slot->getRegNum() == Variable::NoRegister);
// Compute the location of Loc in memory.
// TODO(wala,stichnot): lea should not be required. The address of
@@ -4433,8 +4433,7 @@
// Check if the variable is guaranteed a physical register. This
// can happen either when the variable is pre-colored or when it is
// assigned infinite weight.
- bool MustHaveRegister =
- (Var->hasReg() || Var->getWeight() == RegWeight::Inf);
+ bool MustHaveRegister = (Var->hasReg() || Var->getWeight().isInf());
// We need a new physical register for the operand if:
// Mem is not allowed and Var isn't guaranteed a physical
// register, or