diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-05-01 18:38:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-05-01 18:38:24 +0000 |
commit | a0c53f147a9dd1d14edfedea758bb80d286bbccf (patch) | |
tree | 9e9ac7548449c35a303862cd2ab7ca1384135585 /llvm/lib/MC | |
parent | 87622b8b840145752b3e0b2bdd9674f1fef9f15f (diff) | |
download | bcm5719-llvm-a0c53f147a9dd1d14edfedea758bb80d286bbccf.tar.gz bcm5719-llvm-a0c53f147a9dd1d14edfedea758bb80d286bbccf.zip |
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
llvm-svn: 155925
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 8aef43cb0b4..ec137e28913 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/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(); |