summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-13 20:55:01 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-13 20:55:01 +0000
commit6866104073e365ef1d3b583e2fa8c7ceaf2cac8e (patch)
tree48dae234e270edc1f02430ea9a1afa8749f3d153 /llvm/lib/CodeGen/MIRParser/MIParser.cpp
parent0e7ac9ab2b2646929534ac0c8ddc4a5bac68980d (diff)
downloadbcm5719-llvm-6866104073e365ef1d3b583e2fa8c7ceaf2cac8e.tar.gz
bcm5719-llvm-6866104073e365ef1d3b583e2fa8c7ceaf2cac8e.zip
MIR Parser: Don't allow negative alignments for memory operands.
llvm-svn: 244953
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index 389c5aaec8c..46ad8769fd3 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -1077,7 +1077,7 @@ bool MIParser::parseOffset(int64_t &Offset) {
bool MIParser::parseAlignment(unsigned &Alignment) {
assert(Token.is(MIToken::kw_align));
lex();
- if (Token.isNot(MIToken::IntegerLiteral))
+ if (Token.isNot(MIToken::IntegerLiteral) || Token.integerValue().isSigned())
return error("expected an integer literal after 'align'");
if (getUnsigned(Alignment))
return true;
OpenPOWER on IntegriCloud