add llvm-mc support for parsing the .subsections_via_symbols directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby
2009-07-13 21:03:15 +00:00
parent eb7f7a8665
commit a5c783280f
5 changed files with 36 additions and 0 deletions

View File

@ -527,6 +527,9 @@ bool AsmParser::ParseStatement() {
if (!strcmp(IDVal, ".zerofill"))
return ParseDirectiveDarwinZerofill();
if (!strcmp(IDVal, ".subsections_via_symbols"))
return ParseDirectiveDarwinSubsectionsViaSymbols();
Warning(IDLoc, "ignoring directive for now");
EatToEndOfStatement();
return false;
@ -1052,3 +1055,16 @@ bool AsmParser::ParseDirectiveDarwinZerofill() {
return false;
}
/// ParseDirectiveDarwinSubsectionsViaSymbols
/// ::= .subsections_via_symbols
bool AsmParser::ParseDirectiveDarwinSubsectionsViaSymbols() {
if (Lexer.isNot(asmtok::EndOfStatement))
return TokError("unexpected token in '.subsections_via_symbols' directive");
Lexer.Lex();
Out.SubsectionsViaSymbols();
return false;
}