Use new accessor methods to query for attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-10-04 06:43:21 +00:00
parent 41d876cea3
commit 8f00ae6a3f
4 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ bool HexagonRemoveExtendArgs::runOnFunction(Function &F) {
unsigned Idx = 1;
for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end(); AI != AE;
++AI, ++Idx) {
if (F.paramHasAttr(Idx, Attribute::SExt)) {
if (F.getParamAttributes(Idx).hasSExtAttr()) {
Argument* Arg = AI;
if (!isa<PointerType>(Arg->getType())) {
for (Instruction::use_iterator UI = Arg->use_begin();

View File

@ -1456,7 +1456,7 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F,
continue;
}
if (PAL.paramHasAttr(paramIndex+1, Attribute::ByVal) == false) {
if (PAL.getParamAttributes(paramIndex+1).hasByValAttr() == false) {
// Just a scalar
const PointerType *PTy = dyn_cast<PointerType>(Ty);
if (isKernelFunc) {

View File

@ -965,7 +965,7 @@ NVPTXTargetLowering::LowerFormalArguments(SDValue Chain,
// to newly created nodes. The SDNOdes for params have to
// appear in the same order as their order of appearance
// in the original function. "idx+1" holds that order.
if (PAL.paramHasAttr(i+1, Attribute::ByVal) == false) {
if (PAL.getParamAttributes(i+1).hasByValAttr() == false) {
// A plain scalar.
if (isABI || isKernel) {
// If ABI, load from the param symbol

View File

@ -10494,7 +10494,7 @@ SDValue X86TargetLowering::LowerINIT_TRAMPOLINE(SDValue Op,
for (FunctionType::param_iterator I = FTy->param_begin(),
E = FTy->param_end(); I != E; ++I, ++Idx)
if (Attrs.paramHasAttr(Idx, Attribute::InReg))
if (Attrs.getParamAttributes(Idx).hasInRegAttr())
// FIXME: should only count parameters that are lowered to integers.
InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;