Fix an off by one error.

Part of rdar://9037836 and rdar://9119939


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2011-06-03 20:44:52 +00:00
parent c3526c778e
commit ce1ecf59c8
2 changed files with 10 additions and 2 deletions

View File

@@ -185,11 +185,10 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str,
// Multi-letter constraint
// These will only occur with the existing multiple alternative
// constraints and so we can use the isalpha loop below.
StringRef::iterator ConStart = I;
StringRef::iterator ConStart = ++I;
while (I != E && isalpha(*I))
++I;
pCodes->push_back(std::string(ConStart, I));
++I;
} else {
// Single letter constraint.
pCodes->push_back(std::string(I, I+1));