diff options
Diffstat (limited to 'lib/IR/InlineAsm.cpp')
-rw-r--r-- | lib/IR/InlineAsm.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/IR/InlineAsm.cpp b/lib/IR/InlineAsm.cpp index 99da7caaccf0..fd732f9eda8b 100644 --- a/lib/IR/InlineAsm.cpp +++ b/lib/IR/InlineAsm.cpp @@ -181,6 +181,16 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str, // FIXME: For now assuming these are 2-character constraints. pCodes->push_back(StringRef(I+1, 2)); I += 3; + } else if (*I == '@') { + // Multi-letter constraint + ++I; + unsigned char C = static_cast<unsigned char>(*I); + assert(isdigit(C) && "Expected a digit!"); + int N = C - '0'; + assert(N > 0 && "Found a zero letter constraint!"); + ++I; + pCodes->push_back(StringRef(I, N)); + I += N; } else { // Single letter constraint. pCodes->push_back(StringRef(I, 1)); |