Skip to content

Commit badefe8

Browse files
committed
[AArch64][Build Attributes] Remove redundant comments and unneeded case
- Remove redundant comments - Remove default case from a fully covered switch
1 parent 3ae07d1 commit badefe8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7948,8 +7948,7 @@ bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) {
79487948
}
79497949
Parser.Lex();
79507950

7951-
// Parsing finished. Check for trailing characters (no need to check for
7952-
// comments; they are removed by the lexer).
7951+
// Parsing finished, check for trailing tokens.
79537952
if (Parser.getTok().isNot(llvm::AsmToken::EndOfStatement)) {
79547953
Error(Parser.getTok().getLoc(), "unexpected token for AArch64 build "
79557954
"attributes subsection header directive");
@@ -7992,10 +7991,6 @@ bool AArch64AsmParser::parseDirectiveAeabiAArch64Attr(SMLoc L) {
79927991
} else if (Parser.getTok().is(AsmToken::Identifier)) {
79937992
TagStr = Parser.getTok().getIdentifier();
79947993
switch (ActiveSubsectionID) {
7995-
default:
7996-
// Should not happen
7997-
assert(0 && "Subsection name error");
7998-
break;
79997994
case AArch64BuildAttrs::VENDOR_UNKNOWN:
80007995
// Tag was provided as an unrecognized string instead of an unsigned
80017996
// integer
@@ -8078,8 +8073,7 @@ bool AArch64AsmParser::parseDirectiveAeabiAArch64Attr(SMLoc L) {
80788073
}
80798074
Parser.Lex();
80808075

8081-
// Parsing finished. Check for trailing characters (no need to check for
8082-
// comments; they are removed by the lexer).
8076+
// Parsing finished. Check for trailing tokens.
80838077
if (Parser.getTok().isNot(llvm::AsmToken::EndOfStatement)) {
80848078
Error(Parser.getTok().getLoc(),
80858079
"unexpected token for AArch64 build attributes tag and value "

0 commit comments

Comments
 (0)