diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCParser/ELFAsmParser.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/MC/MCSectionELF.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp index 4cb3dfe9308..a19339da3ed 100644 --- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp @@ -470,6 +470,9 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) { return TokError("expected identifier in directive"); if (UniqueStr != "unique") return TokError("expected 'unique'"); + if (getLexer().isNot(AsmToken::Comma)) + return TokError("expected commma"); + Lex(); if (getParser().parseAbsoluteExpression(UniqueID)) return true; if (UniqueID < 0) diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index 2b9b8c63007..3cd84538425 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/lib/MC/MCSectionELF.cpp @@ -149,7 +149,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, } if (isUnique()) - OS << ",unique " << UniqueID; + OS << ",unique," << UniqueID; OS << '\n'; |

