Delete functions that are redundant with Get methods (#664)

This change assumes that the Carbon typechecker will ensure that the corresponding Get calls are safe.
This commit is contained in:
Geoff Romer
2021-07-19 09:47:26 -07:00
committed by GitHub
parent b9353ee75b
commit c3c89a77a4
4 changed files with 22 additions and 85 deletions
@@ -546,15 +546,4 @@ auto ValueEqual(const Value* v1, const Value* v2, int line_num) -> bool {
}
}
auto ToInteger(const Value* v) -> int {
switch (v->tag()) {
case ValKind::IntValue:
return v->GetIntValue();
default:
std::cerr << "expected an integer, not ";
PrintValue(v, std::cerr);
exit(-1);
}
}
} // namespace Carbon