mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
[MC] Return early when .fill size is negative
Rather than invoking emitFill with negative size, which may trigger an undefined behavior, return immediately after emitting the warning. Differential Revision: http://reviews.llvm.org/D20768 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c12ac37f8d
commit
c6eef17f1f
@ -2801,7 +2801,7 @@ bool AsmParser::parseDirectiveFill() {
|
||||
|
||||
if (FillSize < 0) {
|
||||
Warning(SizeLoc, "'.fill' directive with negative size has no effect");
|
||||
NumValues = MCConstantExpr::create(0, getStreamer().getContext());
|
||||
return false;
|
||||
}
|
||||
if (FillSize > 8) {
|
||||
Warning(SizeLoc, "'.fill' directive with size greater than 8 has been truncated to 8");
|
||||
|
Loading…
Reference in New Issue
Block a user