[lld] r277222 - [LinkerScript] Filler can have a decimal value.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 05:59:41 PDT 2016
> + next();
> + if (Tok.startswith("=0x"))
> + return parseHex(Tok.substr(3));
This is missing the error check for Value below.
> + // This must be a decimal.
> + unsigned int Value;
> + if (Tok.substr(1).getAsInteger(10, Value)) {
> + setError("filler should be a decimal/hexadecimal value");
> return {};
> }
> - Tok = Tok.substr(3);
> - next();
> - return parseHex(Tok);
> + if (Value > 255)
> + setError("only single bytes decimal are supported for the filler now");
I think you can just pass a base of 0 to getAsInteger and it will
detect the base.
Cheers,
Rafael
More information about the llvm-commits
mailing list