From a5c783280f83df5c60a8ed9e32c61b05a11048e3 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Mon, 13 Jul 2009 21:03:15 +0000 Subject: 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 --- tools/llvm-mc/AsmParser.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tools/llvm-mc/AsmParser.cpp') diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index a2cdea4c4d..fe9d4f3352 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/tools/llvm-mc/AsmParser.cpp @@ -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; +} -- cgit v1.2.3