summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/AsmParser.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2009-07-13 21:03:15 +0000
committerKevin Enderby <enderby@apple.com>2009-07-13 21:03:15 +0000
commitc9d93ef2c63b08d134217b20315d64eefeeed5f6 (patch)
tree1f70be2238dab5c2e4d980358c82831253920bf8 /llvm/tools/llvm-mc/AsmParser.cpp
parent7f3a529ae977e1c4f726a2a4cd40624b673e5d90 (diff)
downloadbcm5719-llvm-c9d93ef2c63b08d134217b20315d64eefeeed5f6.tar.gz
bcm5719-llvm-c9d93ef2c63b08d134217b20315d64eefeeed5f6.zip
add llvm-mc support for parsing the .subsections_via_symbols directive.
llvm-svn: 75500
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
-rw-r--r--llvm/tools/llvm-mc/AsmParser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp
index a2cdea4c4dc..fe9d4f3352f 100644
--- a/llvm/tools/llvm-mc/AsmParser.cpp
+++ b/llvm/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;
+}
OpenPOWER on IntegriCloud