aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-05-01 18:38:24 +0000
committerJim Grosbach <grosbach@apple.com>2012-05-01 18:38:24 +0000
commit25c7b6e0df86d75bd7b0b92060a9fc37786e397c (patch)
tree75261fd7b194bd7d14e3949db09944bd4ba423c0 /lib/MC/MCParser/AsmParser.cpp
parent769ea2f93fa7fdd73f8388e863cf4dc9689d2e38 (diff)
MC: Remove errant EatToEndOfStatement() in asm parser.
The caller is already responsible for eating any additional input on the line. Putting an additional EatToEndOfStatement() in ParseStatement() causes an entire extra statement to be consumed when treating warnings as errors. For example, test/MC/macros.s will assert() because the .endmacro directive is missed as a result. rdar://11355843 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index 8aef43cb0b..ec137e2891 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -1238,9 +1238,7 @@ bool AsmParser::ParseStatement() {
if (!getTargetParser().ParseDirective(ID))
return false;
- bool retval = Warning(IDLoc, "ignoring directive for now");
- EatToEndOfStatement();
- return retval;
+ return Warning(IDLoc, "ignoring directive for now");
}
CheckForValidSection();