diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-mc/AsmParser.cpp | 16 | ||||
-rw-r--r-- | tools/llvm-mc/AsmParser.h | 3 |
2 files changed, 19 insertions, 0 deletions
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; +} diff --git a/tools/llvm-mc/AsmParser.h b/tools/llvm-mc/AsmParser.h index 620ac19c98..fcdd064977 100644 --- a/tools/llvm-mc/AsmParser.h +++ b/tools/llvm-mc/AsmParser.h @@ -112,6 +112,9 @@ private: bool ParseDirectiveComm(bool IsLocal); // ".comm" and ".lcomm" bool ParseDirectiveDarwinZerofill(); // Darwin specific ".zerofill" + + // Darwin specific ".subsections_via_symbols" + bool ParseDirectiveDarwinSubsectionsViaSymbols(); }; } // end namespace llvm |