[cfe-commits] r55310 - /cfe/trunk/lib/Basic/TargetInfo.cpp

Daniel Dunbar daniel at zuster.org
Mon Aug 25 02:46:27 PDT 2008


Author: ddunbar
Date: Mon Aug 25 04:46:27 2008
New Revision: 55310

URL: http://llvm.org/viewvc/llvm-project?rev=55310&view=rev
Log:
Stop asserting in TargetInfo::validateInputConstraint
 - Sema gives a perfectively nice error message on invalid constraints.

Modified:
    cfe/trunk/lib/Basic/TargetInfo.cpp

Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=55310&r1=55309&r2=55310&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Mon Aug 25 04:46:27 2008
@@ -193,10 +193,10 @@
         if (i >= NumOutputs)
           return false;
       } else if (!validateAsmConstraint(*Name, info)) {
-        // FIXME: This assert is in place temporarily 
-        // so we can add more constraints as we hit it.
-        // Eventually, an unknown constraint should just be treated as 'g'.
-        assert(0 && "Unknown input constraint type!");
+        // FIXME: This error return is in place temporarily so we can
+        // add more constraints as we hit it.  Eventually, an unknown
+        // constraint should just be treated as 'g'.
+        return false;
       }        
     case '%': // commutative
       // FIXME: Fail if % is used with the last operand.





More information about the cfe-commits mailing list