This fixes https://bugs.llvm.org//show_bug.cgi?id=31280
Differential revision: https://reviews.llvm.org/D31026
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298067
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
Lex();
if (L.isNot(AsmToken::At) && L.isNot(AsmToken::Percent) &&
- L.isNot(AsmToken::String))
- return TokError("expected '@<type>', '%<type>' or \"<type>\"");
+ L.isNot(AsmToken::String)) {
+ if (L.getAllowAtInIdentifier())
+ return TokError("expected '@<type>', '%<type>' or \"<type>\"");
+ else
+ return TokError("expected '%<type>' or \"<type>\"");
+ }
if (!L.is(AsmToken::String))
Lex();
if (L.is(AsmToken::Integer)) {
// CHECK: .type TYPE #32
// CHECK: ^
+ // For ARM, the comment character is '@', so we don't list '@<type>' as a
+ // valid option.
+ .section "foo", "a", @progbits
+// CHECK: error: expected '%<type>' or "<type>"