From: Ted Kremenek Date: Thu, 24 Apr 2008 16:36:38 +0000 (+0000) Subject: Have ValidateOutputConstraint return false instead of firing an assertion X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ab201a324b2153ce151904d397c05fab798e0bc;p=clang Have ValidateOutputConstraint return false instead of firing an assertion 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 --- diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 6c3389cc36..4ce32a9972 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -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;