mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user