microinstruction: Arguments of Inst::Use and Inst::UndoUse should be const

This commit is contained in:
MerryMage
2017-01-29 22:53:46 +00:00
parent 1d4446cad5
commit 22804dc6a5
2 changed files with 4 additions and 4 deletions

View File

@@ -312,7 +312,7 @@ void Inst::ReplaceUsesWith(Value replacement) {
args[0] = replacement;
}
void Inst::Use(Value& value) {
void Inst::Use(const Value& value) {
value.GetInst()->use_count++;
switch (op){
@@ -333,7 +333,7 @@ void Inst::Use(Value& value) {
}
}
void Inst::UndoUse(Value& value) {
void Inst::UndoUse(const Value& value) {
value.GetInst()->use_count--;
switch (op){