aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-09-19 23:35:21 +0000
committerBill Wendling <isanbard@gmail.com>2012-09-19 23:35:21 +0000
commite853d2e2508e21b5c3156c7d8b6e6902a7d2604a (patch)
tree78bd638d1f4497e2667f090f141e95df982dc034 /lib
parent3e9b6db60ff5864d6789f768610a3509dac0b5ef (diff)
downloadexternal_llvm-e853d2e2508e21b5c3156c7d8b6e6902a7d2604a.zip
external_llvm-e853d2e2508e21b5c3156c7d8b6e6902a7d2604a.tar.gz
external_llvm-e853d2e2508e21b5c3156c7d8b6e6902a7d2604a.tar.bz2
Add predicates for queries on whether an attribute exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index dcaa9ba..56f3a45 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -996,9 +996,9 @@ void llvm::GetReturnInfo(Type* ReturnType, Attributes attr,
EVT VT = ValueVTs[j];
ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
- if (attr & Attribute::SExt)
+ if (attr.hasSExtAttr())
ExtendKind = ISD::SIGN_EXTEND;
- else if (attr & Attribute::ZExt)
+ else if (attr.hasZExtAttr())
ExtendKind = ISD::ZERO_EXTEND;
// FIXME: C calling convention requires the return type to be promoted to
@@ -1016,18 +1016,17 @@ void llvm::GetReturnInfo(Type* ReturnType, Attributes attr,
// 'inreg' on function refers to return value
ISD::ArgFlagsTy Flags = ISD::ArgFlagsTy();
- if (attr & Attribute::InReg)
+ if (attr.hasInRegAttr())
Flags.setInReg();
// Propagate extension type if any
- if (attr & Attribute::SExt)
+ if (attr.hasSExtAttr())
Flags.setSExt();
- else if (attr & Attribute::ZExt)
+ else if (attr.hasZExtAttr())
Flags.setZExt();
- for (unsigned i = 0; i < NumParts; ++i) {
+ for (unsigned i = 0; i < NumParts; ++i)
Outs.push_back(ISD::OutputArg(Flags, PartVT, /*isFixed=*/true));
- }
}
}