summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/InlineAsm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/InlineAsm.cpp b/llvm/lib/IR/InlineAsm.cpp
index a181c5e834d..b7309b4f67b 100644
--- a/llvm/lib/IR/InlineAsm.cpp
+++ b/llvm/lib/IR/InlineAsm.cpp
@@ -159,6 +159,8 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str,
// If Operand N already has a matching input, reject this. An output
// can't be constrained to the same value as multiple inputs.
if (isMultipleAlternative) {
+ if (multipleAlternativeIndex >= ConstraintsSoFar[N].multipleAlternatives.size())
+ return true;
InlineAsm::SubConstraintInfo &scInfo =
ConstraintsSoFar[N].multipleAlternatives[multipleAlternativeIndex];
if (scInfo.MatchingInput != -1)
@@ -290,4 +292,3 @@ bool InlineAsm::Verify(FunctionType *Ty, StringRef ConstStr) {
if (Ty->getNumParams() != NumInputs) return false;
return true;
}
-
OpenPOWER on IntegriCloud