summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-24 16:36:38 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-24 16:36:38 +0000
commitb44485b83574a06bcbcb35ab3ba128582d87c366 (patch)
tree0e1acdfff122494247c2c597a611a2e5d98487e1
parent218c8b9d0a7426f5c5a0d2e8e83c25d96085c1f5 (diff)
downloadbcm5719-llvm-b44485b83574a06bcbcb35ab3ba128582d87c366.tar.gz
bcm5719-llvm-b44485b83574a06bcbcb35ab3ba128582d87c366.zip
Have ValidateOutputConstraint return false instead of firing an assertion
when processing a constraint we don't understand. This allows the frontend to gracefully fail. llvm-svn: 50213
-rw-r--r--clang/lib/Basic/TargetInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 6c3389cc363..4ce32a9972f 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud