mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 00:20:31 +00: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:
1 parent
b9353ee75b
commit
c3c89a77a4
4 files changed
+22
-85
No files matched your search
@@ -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