[cfe-commits] [PATCH] mult-alt constraint fix

John Thompson john.thompson.jtsoftware at gmail.com
Tue Aug 10 17:43:50 PDT 2010


Apparently, "=r,m" constraints are legal.  This fixes pr7869.  Permission to
check-in?

Index: lib/Basic/TargetInfo.cpp
===================================================================
--- lib/Basic/TargetInfo.cpp (revision 110706)
+++ lib/Basic/TargetInfo.cpp (working copy)
@@ -289,11 +289,9 @@
       break;
     case ',': // multiple alternative constraint.  Pass it.
       Name++;
-      // An output constraint must start with '=' or '+'
-      if (*Name != '=' && *Name != '+')
-        return false;
-      if (*Name == '+')
-        Info.setIsReadWrite();
+      // Handle additional optional '=' or '+' modifiers.
+      if (*Name == '=' || *Name == '+')
+        Name++;
       break;
     case '?': // Disparage slightly code.
     case '!': // Disparage severly.


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100810/bdb0383e/attachment.html>


More information about the cfe-commits mailing list