mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 06:00:30 +00:00
[MC] Separate non-parsing operations from conditional chains. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf907e040e
commit
8c782052e9
@ -2610,10 +2610,12 @@ bool AsmParser::parseDirectiveReloc(SMLoc DirectiveLoc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parseToken(AsmToken::EndOfStatement,
|
if (parseToken(AsmToken::EndOfStatement,
|
||||||
"unexpected token in .reloc directive") ||
|
"unexpected token in .reloc directive"))
|
||||||
check(getStreamer().EmitRelocDirective(*Offset, Name, Expr, DirectiveLoc),
|
|
||||||
NameLoc, "unknown relocation name"))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (getStreamer().EmitRelocDirective(*Offset, Name, Expr, DirectiveLoc))
|
||||||
|
return Error(NameLoc, "unknown relocation name");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3144,11 +3146,12 @@ bool AsmParser::parseDirectiveCVFile() {
|
|||||||
// directory. Allow the strings to have escaped octal character sequence.
|
// directory. Allow the strings to have escaped octal character sequence.
|
||||||
parseEscapedString(Filename) ||
|
parseEscapedString(Filename) ||
|
||||||
parseToken(AsmToken::EndOfStatement,
|
parseToken(AsmToken::EndOfStatement,
|
||||||
"unexpected token in '.cv_file' directive") ||
|
"unexpected token in '.cv_file' directive"))
|
||||||
check(getStreamer().EmitCVFileDirective(FileNumber, Filename) == 0,
|
|
||||||
FileNumberLoc, "file number already allocated"))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (getStreamer().EmitCVFileDirective(FileNumber, Filename) == 0)
|
||||||
|
Error(FileNumberLoc, "file number already allocated");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3927,11 +3930,12 @@ bool AsmParser::parseDirectivePurgeMacro(SMLoc DirectiveLoc) {
|
|||||||
if (getTokenLoc(Loc) || check(parseIdentifier(Name), Loc,
|
if (getTokenLoc(Loc) || check(parseIdentifier(Name), Loc,
|
||||||
"expected identifier in '.purgem' directive") ||
|
"expected identifier in '.purgem' directive") ||
|
||||||
parseToken(AsmToken::EndOfStatement,
|
parseToken(AsmToken::EndOfStatement,
|
||||||
"unexpected token in '.purgem' directive") ||
|
"unexpected token in '.purgem' directive"))
|
||||||
check(!lookupMacro(Name), DirectiveLoc,
|
|
||||||
"macro '" + Name + "' is not defined"))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (!lookupMacro(Name))
|
||||||
|
return Error(DirectiveLoc, "macro '" + Name + "' is not defined");
|
||||||
|
|
||||||
undefineMacro(Name);
|
undefineMacro(Name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -4210,11 +4214,12 @@ bool AsmParser::parseDirectiveIncbin() {
|
|||||||
"expected string in '.incbin' directive") ||
|
"expected string in '.incbin' directive") ||
|
||||||
parseEscapedString(Filename) ||
|
parseEscapedString(Filename) ||
|
||||||
parseToken(AsmToken::EndOfStatement,
|
parseToken(AsmToken::EndOfStatement,
|
||||||
"unexpected token in '.incbin' directive") ||
|
"unexpected token in '.incbin' directive"))
|
||||||
// Attempt to process the included file.
|
|
||||||
check(processIncbinFile(Filename), IncbinLoc,
|
|
||||||
"Could not find incbin file '" + Filename + "'"))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Attempt to process the included file.
|
||||||
|
if (processIncbinFile(Filename))
|
||||||
|
return Error(IncbinLoc, "Could not find incbin file '" + Filename + "'");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user