mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 10:54:42 +00:00
Some small (and mostly cosmetic) fixes.
llvm-svn: 172640
This commit is contained in:
parent
a9a8a1cb79
commit
b713627125
@ -1113,8 +1113,7 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||||||
if (!TheCondState.Ignore)
|
if (!TheCondState.Ignore)
|
||||||
return TokError("unexpected token at start of statement");
|
return TokError("unexpected token at start of statement");
|
||||||
IDVal = "";
|
IDVal = "";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
IDVal = getTok().getString();
|
IDVal = getTok().getString();
|
||||||
Lex(); // Consume the integer token to be used as an identifier token.
|
Lex(); // Consume the integer token to be used as an identifier token.
|
||||||
if (Lexer.getKind() != AsmToken::Colon) {
|
if (Lexer.getKind() != AsmToken::Colon) {
|
||||||
@ -1122,12 +1121,10 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||||||
return TokError("unexpected token at start of statement");
|
return TokError("unexpected token at start of statement");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (Lexer.is(AsmToken::Dot)) {
|
} else if (Lexer.is(AsmToken::Dot)) {
|
||||||
// Treat '.' as a valid identifier in this context.
|
// Treat '.' as a valid identifier in this context.
|
||||||
Lex();
|
Lex();
|
||||||
IDVal = ".";
|
IDVal = ".";
|
||||||
|
|
||||||
} else if (ParseIdentifier(IDVal)) {
|
} else if (ParseIdentifier(IDVal)) {
|
||||||
if (!TheCondState.Ignore)
|
if (!TheCondState.Ignore)
|
||||||
return TokError("unexpected token at start of statement");
|
return TokError("unexpected token at start of statement");
|
||||||
@ -1168,7 +1165,8 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||||||
return ParseDirectiveEndIf(IDLoc);
|
return ParseDirectiveEndIf(IDLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are in a ".if 0" block, ignore this statement.
|
// Ignore the statement if in the middle of inactive conditional
|
||||||
|
// (e.g. ".if 0").
|
||||||
if (TheCondState.Ignore) {
|
if (TheCondState.Ignore) {
|
||||||
EatToEndOfStatement();
|
EatToEndOfStatement();
|
||||||
return false;
|
return false;
|
||||||
@ -1451,13 +1449,10 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||||||
CheckForValidSection();
|
CheckForValidSection();
|
||||||
|
|
||||||
// Canonicalize the opcode to lower case.
|
// Canonicalize the opcode to lower case.
|
||||||
SmallString<128> OpcodeStr;
|
std::string OpcodeStr = IDVal.lower();
|
||||||
for (unsigned i = 0, e = IDVal.size(); i != e; ++i)
|
|
||||||
OpcodeStr.push_back(tolower(IDVal[i]));
|
|
||||||
|
|
||||||
ParseInstructionInfo IInfo(Info.AsmRewrites);
|
ParseInstructionInfo IInfo(Info.AsmRewrites);
|
||||||
bool HadError = getTargetParser().ParseInstruction(IInfo, OpcodeStr.str(),
|
bool HadError = getTargetParser().ParseInstruction(IInfo, OpcodeStr,
|
||||||
IDLoc,Info.ParsedOperands);
|
IDLoc, Info.ParsedOperands);
|
||||||
Info.ParseError = HadError;
|
Info.ParseError = HadError;
|
||||||
|
|
||||||
// Dump the parsed representation, if requested.
|
// Dump the parsed representation, if requested.
|
||||||
@ -1489,7 +1484,7 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||||||
const std::vector<MCDwarfFile *> &MCDwarfFiles =
|
const std::vector<MCDwarfFile *> &MCDwarfFiles =
|
||||||
getContext().getMCDwarfFiles();
|
getContext().getMCDwarfFiles();
|
||||||
if (CppHashFilename.size() != 0) {
|
if (CppHashFilename.size() != 0) {
|
||||||
if(MCDwarfFiles[getContext().getGenDwarfFileNumber()]->getName() !=
|
if (MCDwarfFiles[getContext().getGenDwarfFileNumber()]->getName() !=
|
||||||
CppHashFilename)
|
CppHashFilename)
|
||||||
getStreamer().EmitDwarfFileDirective(
|
getStreamer().EmitDwarfFileDirective(
|
||||||
getContext().nextGenDwarfFileNumber(), StringRef(), CppHashFilename);
|
getContext().nextGenDwarfFileNumber(), StringRef(), CppHashFilename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user