]> granicus.if.org Git - clang/commitdiff
Have ValidateOutputConstraint return false instead of firing an assertion
authorTed Kremenek <kremenek@apple.com>
Thu, 24 Apr 2008 16:36:38 +0000 (16:36 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 24 Apr 2008 16:36:38 +0000 (16:36 +0000)
when processing a constraint we don't understand.  This allows the frontend
to gracefully fail.

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

lib/Basic/TargetInfo.cpp

index 6c3389cc363e40933c861b253554556c90965ec9..4ce32a9972fb04e017d39d171964f2bc88e3106d 100644 (file)
@@ -145,10 +145,10 @@ bool TargetInfo::validateOutputConstraint(const char *Name,
     switch (*Name) {
     default:
       if (!validateAsmConstraint(*Name, info)) {
-        // FIXME: This assert is in place temporarily 
+        // FIXME: We temporarily return false
         // so we can add more constraints as we hit it.
         // Eventually, an unknown constraint should just be treated as 'g'.
-        assert(0 && "Unknown output constraint type!");
+        return false;
       }
     case '&': // early clobber.
       break;