OSDN Git Service

[IR] Make getParamAttributes take argument numbers, not ArgNo+1
authorReid Kleckner <rnk@google.com>
Thu, 13 Apr 2017 23:12:13 +0000 (23:12 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 13 Apr 2017 23:12:13 +0000 (23:12 +0000)
commit1c35defd748685792c07a87e7b130390edc2e80f
treea2123372b49a7075a2d246565d514b7c82e10411
parentc67ef6aaf75865024462576a5b790e46ccc2e75e
[IR] Make getParamAttributes take argument numbers, not ArgNo+1

Add hasParamAttribute() and use it instead of hasAttribute(ArgNo+1,
Kind) everywhere.

The fact that the AttributeList index for an argument is ArgNo+1 should
be a hidden implementation detail.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300272 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/llvm/IR/Attributes.h
include/llvm/IR/Function.h
lib/IR/Attributes.cpp
lib/IR/Function.cpp
lib/IR/Verifier.cpp
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyFastISel.cpp
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/MergeFunctions.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Utils/CloneFunction.cpp