forked from OSchip/llvm-project
Remove dead code.
parseInt assumed that it could take a negative number literal (e.g. "-123"). However, such number is in reality already handled as a unary operator '-' followed by a number literal, so the number literal is always non-negative. Thus, this code is dead. llvm-svn: 322453
This commit is contained in:
parent
84d036a0d1
commit
fe148c88da
|
@ -880,13 +880,6 @@ Expr ScriptParser::readConstant() {
|
|||
// "0x" or suffixed with "H") and decimal numbers. Decimal numbers may
|
||||
// have "K" (Ki) or "M" (Mi) suffixes.
|
||||
static Optional<uint64_t> parseInt(StringRef Tok) {
|
||||
// Negative number
|
||||
if (Tok.startswith("-")) {
|
||||
if (Optional<uint64_t> Val = parseInt(Tok.substr(1)))
|
||||
return -*Val;
|
||||
return None;
|
||||
}
|
||||
|
||||
// Hexadecimal
|
||||
uint64_t Val;
|
||||
if (Tok.startswith_lower("0x")) {
|
||||
|
|
Loading…
Reference in New Issue