Use method to query for attributes.
authorBill Wendling <isanbard@gmail.com>
Thu, 4 Oct 2012 06:49:41 +0000 (06:49 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 4 Oct 2012 06:49:41 +0000 (06:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165207 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/ArgumentPromotion.cpp

index 10f5b6e6583e11cc4212fc124cfa6d851bcab77a..548965c6d7e4e980331613f0b9317ba28f0380e2 100644 (file)
@@ -153,7 +153,7 @@ CallGraphNode *ArgPromotion::PromoteArguments(CallGraphNode *CGN) {
   SmallPtrSet<Argument*, 8> ArgsToPromote;
   SmallPtrSet<Argument*, 8> ByValArgsToTransform;
   for (unsigned i = 0; i != PointerArgs.size(); ++i) {
-    bool isByVal = F->paramHasAttr(PointerArgs[i].second+1, Attribute::ByVal);
+    bool isByVal=F->getParamAttributes(PointerArgs[i].second+1).hasByValAttr();
     Argument *PtrArg = PointerArgs[i].first;
     Type *AgTy = cast<PointerType>(PtrArg->getType())->getElementType();