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

Ted Kremenek kremenek at apple.com
Thu Apr 24 09:36:38 PDT 2008


Author: kremenek
Date: Thu Apr 24 11:36:38 2008
New Revision: 50213

URL: http://llvm.org/viewvc/llvm-project?rev=50213&view=rev
Log:
Have ValidateOutputConstraint return false instead of firing an assertion
when processing a constraint we don't understand.  This allows the frontend
to gracefully fail.

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=50213&r1=50212&r2=50213&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Thu Apr 24 11:36:38 2008
@@ -145,10 +145,10 @@
     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;





More information about the cfe-commits mailing list