aboutsummaryrefslogtreecommitdiff
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
commita0c53f147a9dd1d14edfedea758bb80d286bbccf (patch)
tree9e9ac7548449c35a303862cd2ab7ca1384135585
parent87622b8b840145752b3e0b2bdd9674f1fef9f15f (diff)
downloadllvm-a0c53f147a9dd1d14edfedea758bb80d286bbccf.zip
llvm-a0c53f147a9dd1d14edfedea758bb80d286bbccf.tar.gz
llvm-a0c53f147a9dd1d14edfedea758bb80d286bbccf.tar.bz2
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
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 8aef43c..ec137e2 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();