mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 01:07:04 +08:00
Use llvm::Optional instead of UINT_MAX to represent a null value.
llvm-svn: 315168
This commit is contained in:
@@ -388,25 +388,26 @@ void ScriptParser::readOutputFormat() {
|
||||
|
||||
void ScriptParser::readPhdrs() {
|
||||
expect("{");
|
||||
while (!ErrorCount && !consume("}")) {
|
||||
Script->Opt.PhdrsCommands.push_back(
|
||||
{next(), PT_NULL, false, false, UINT_MAX, nullptr});
|
||||
|
||||
PhdrsCommand &PhdrCmd = Script->Opt.PhdrsCommands.back();
|
||||
PhdrCmd.Type = readPhdrType();
|
||||
while (!ErrorCount && !consume("}")) {
|
||||
PhdrsCommand Cmd;
|
||||
Cmd.Name = next();
|
||||
Cmd.Type = readPhdrType();
|
||||
|
||||
while (!ErrorCount && !consume(";")) {
|
||||
if (consume("FILEHDR"))
|
||||
PhdrCmd.HasFilehdr = true;
|
||||
Cmd.HasFilehdr = true;
|
||||
else if (consume("PHDRS"))
|
||||
PhdrCmd.HasPhdrs = true;
|
||||
Cmd.HasPhdrs = true;
|
||||
else if (consume("AT"))
|
||||
PhdrCmd.LMAExpr = readParenExpr();
|
||||
Cmd.LMAExpr = readParenExpr();
|
||||
else if (consume("FLAGS"))
|
||||
PhdrCmd.Flags = readParenExpr()().getValue();
|
||||
Cmd.Flags = readParenExpr()().getValue();
|
||||
else
|
||||
setError("unexpected header attribute: " + next());
|
||||
}
|
||||
|
||||
Script->Opt.PhdrsCommands.push_back(Cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user