diff options
author | Anders Carlsson <andersca@mac.com> | 2010-11-03 02:22:29 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-11-03 02:22:29 +0000 |
commit | 86eda39c8af47280273758debf0432933bdeee3c (patch) | |
tree | 5532cf78d3a87a350e8157695394aa9056f4d02a /lib/Basic/TargetInfo.cpp | |
parent | 7533a5b65f81a4eed1e0f0afeb859e26bc0c056b (diff) |
A number in an input constraint can't point to a read-write ('+') constraint. Fixes PR3904.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 6ef306d27e..947cbfc3f6 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -350,6 +350,10 @@ bool TargetInfo::validateInputConstraint(ConstraintInfo *OutputConstraints, if (i >= NumOutputs) return false; + // A number must refer to an output only operand. + if (OutputConstraints[i].isReadWrite()) + return false; + // The constraint should have the same info as the respective // output constraint. Info.setTiedOperand(i, OutputConstraints[i]); |