[llvm-commits] [llvm] r132476 - /llvm/trunk/lib/VMCore/InlineAsm.cpp

Eric Christopher echristo at apple.com
Thu Jun 2 12:26:38 PDT 2011


Author: echristo
Date: Thu Jun  2 14:26:37 2011
New Revision: 132476

URL: http://llvm.org/viewvc/llvm-project?rev=132476&view=rev
Log:
Add a new parse hint for multi-letter constraints in inline asm.

Testcase will come when we use it.

Part of rdar://9119939

Modified:
    llvm/trunk/lib/VMCore/InlineAsm.cpp

Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/InlineAsm.cpp?rev=132476&r1=132475&r2=132476&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/InlineAsm.cpp (original)
+++ llvm/trunk/lib/VMCore/InlineAsm.cpp Thu Jun  2 14:26:37 2011
@@ -181,6 +181,15 @@
       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));





More information about the llvm-commits mailing list