Add a new parse hint for multi-letter constraints in inline asm.

Testcase will come when we use it.

Part of rdar://9119939

llvm-svn: 132476
This commit is contained in:
Eric Christopher 2011-06-02 19:26:37 +00:00
parent af7e57f485
commit 0c337a44e9

View File

@ -181,6 +181,15 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str,
multipleAlternativeIndex++; multipleAlternativeIndex++;
pCodes = &multipleAlternatives[multipleAlternativeIndex].Codes; pCodes = &multipleAlternatives[multipleAlternativeIndex].Codes;
++I; ++I;
} else if (*I == '^') {
// 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;
while (I != E && isalpha(*I))
++I;
pCodes->push_back(std::string(ConStart, I));
++I;
} else { } else {
// Single letter constraint. // Single letter constraint.
pCodes->push_back(std::string(I, I+1)); pCodes->push_back(std::string(I, I+1));