]> granicus.if.org Git - clang/commitdiff
Stop asserting in TargetInfo::validateInputConstraint
authorDaniel Dunbar <daniel@zuster.org>
Mon, 25 Aug 2008 09:46:27 +0000 (09:46 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 25 Aug 2008 09:46:27 +0000 (09:46 +0000)
 - Sema gives a perfectively nice error message on invalid constraints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55310 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/TargetInfo.cpp

index c1597cdeb1337598ae9b179106890e599305f92a..8a11925e06b52f4da59cc85b63fa8a2516a9bb91 100644 (file)
@@ -193,10 +193,10 @@ bool TargetInfo::validateInputConstraint(const char *Name,
         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.