diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-06 16:34:41 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-06 16:34:41 +0000 |
| commit | 41e2b5c55fafe4ed6030be2a3f362e119df0c085 (patch) | |
| tree | 339f6ada3c15946a1942a6690495e7682029363a /llvm/lib/MC | |
| parent | 981d2a04b7b46c1bcc9344a8c0797ad43bd40a0b (diff) | |
| download | bcm5719-llvm-41e2b5c55fafe4ed6030be2a3f362e119df0c085.tar.gz bcm5719-llvm-41e2b5c55fafe4ed6030be2a3f362e119df0c085.zip | |
Use a comma after the unique keyword.
H.J. Lu noted that all .section options are separated by a comma.
This patch changes the syntax of unique to require one.
llvm-svn: 234174
Diffstat (limited to 'llvm/lib/MC')
| -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'; |

