Index: src/IceOperand.cpp |
diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp |
index ada16068337ebe8c78bef412e2827c1ce89ae5a6..73b0958e8699494e31c15f22a616225df7a7db11 100644 |
--- a/src/IceOperand.cpp |
+++ b/src/IceOperand.cpp |
@@ -86,7 +86,6 @@ bool operator==(const RelocatableTuple &A, const RelocatableTuple &B) { |
return true; |
} |
-const RegNumT RegNumT::NoRegister(RegNumT::NoRegisterValue); |
RegNumT::BaseType RegNumT::Limit = 0; |
bool operator<(const RegWeight &A, const RegWeight &B) { |
@@ -201,7 +200,7 @@ const Variable *Variable::asType(Type Ty, RegNumT NewRegNum) const { |
Variable *V = new (getCurrentCfgAllocator()->Allocate<Variable>()) |
Variable(kVariable, Ty, Number); |
V->NameIndex = NameIndex; |
- V->RegNum = NewRegNum == RegNumT::NoRegister ? RegNum : NewRegNum; |
+ V->RegNum = NewRegNum.hasValue() ? NewRegNum : RegNum; |
V->StackOffset = StackOffset; |
return V; |
} |