aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-11-30 23:46:56 +0000
committerBill Wendling <isanbard@gmail.com>2012-11-30 23:46:56 +0000
commit6e6330c07a42ace74637d0ad7356a2fa20de81ec (patch)
treea0455818f5e4307dd595bbdd0fd7a3b20744df3c /lib/Basic/Targets.cpp
parent5a98f1da0e6eb5c4776f513eacc7756eaf15dff3 (diff)
Don't emit a warning with an input/output parameter. We assume the user knows what they're doing here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 3c076ca4f0..6a30ca8476 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3365,6 +3365,7 @@ public:
const char Modifier,
unsigned Size) const {
bool isOutput = (Constraint[0] == '=');
+ bool isInOut = (Constraint[0] == '+');
// Strip off constraint modifiers.
while (Constraint[0] == '=' ||
@@ -3377,7 +3378,8 @@ public:
case 'r': {
switch (Modifier) {
default:
- return (isOutput && Size >= 32) || Size <= 32;
+ return isInOut || (isOutput && Size >= 32) ||
+ (!isOutput && !isInOut && Size <= 32);
case 'q':
// A register of size 32 cannot fit a vector type.
return false;