diff options
author | Eric Christopher <echristo@apple.com> | 2011-06-02 19:26:37 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-06-02 19:26:37 +0000 |
commit | 5fab03d54cc1e624b9c9f32a66505aff388d99da (patch) | |
tree | 5f8f87c22fc3f2a08dd55c7cfeb5cfae549b2f64 | |
parent | 1f344f052e7e7700f5bfe5ca3e4f84b284f47376 (diff) | |
download | llvm-5fab03d54cc1e624b9c9f32a66505aff388d99da.tar.gz llvm-5fab03d54cc1e624b9c9f32a66505aff388d99da.tar.bz2 llvm-5fab03d54cc1e624b9c9f32a66505aff388d99da.tar.xz |
Add a new parse hint for multi-letter constraints in inline asm.
Testcase will come when we use it.
Part of rdar://9119939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132476 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/InlineAsm.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/InlineAsm.cpp b/lib/VMCore/InlineAsm.cpp index e4f99f09a5..70d0e3881e 100644 --- a/lib/VMCore/InlineAsm.cpp +++ b/lib/VMCore/InlineAsm.cpp @@ -181,6 +181,15 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str, multipleAlternativeIndex++; pCodes = &multipleAlternatives[multipleAlternativeIndex].Codes; ++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 { // Single letter constraint. pCodes->push_back(std::string(I, I+1)); |