llvm/utils
Reid Kleckner a82b376f69 [IR] Abstract away ArgNo+1 attribute indexing as much as possible
Summary:
Do three things to help with that:
- Add AttributeList::FirstArgIndex, which is an enumerator currently set
  to 1. It allows us to change the indexing scheme with fewer changes.
- Add addParamAttr/removeParamAttr. This just shortens addAttribute call
  sites that would otherwise need to spell out FirstArgIndex.
- Remove some attribute-specific getters and setters from Function that
  take attribute list indices.  Most of these were only used from
  BuildLibCalls, and doesNotAlias was only used to test or set if the
  return value is malloc-like.

I'm happy to split the patch, but I think they are probably easier to
review when taken together.

This patch should be NFC, but it sets the stage to change the indexing
scheme to this, which is more convenient when indexing into an array:
  0: func attrs
  1: retattrs
  2...: arg attrs

Reviewers: chandlerc, pete, javed.absar

Subscribers: david2050, llvm-commits

Differential Revision: https://reviews.llvm.org/D32811

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 18:17:31 +00:00
..
abtest
bugpoint
count
crosstool
emacs
FileCheck Test commit. 2017-03-14 10:51:14 +00:00
fpcmp
gdb-scripts Add GDB pretty-printer for llvm::Twine type 2017-03-15 20:51:44 +00:00
git
git-svn [git-llvm] Remove CR from middle of svn propget output 2017-04-24 22:26:46 +00:00
jedit
kate
KillTheDoctor
lint
lit [lit] Try to exit more cleanly 2017-05-02 17:45:16 +00:00
llvm-build
llvm-lit
LLVMVisualizers
Misc
not
opt-viewer [opt-diff] Fix the case when the script is invoked with directories 2017-03-06 19:15:22 +00:00
PerfectShuffle
release build_llvm_package.bat: Move to VS2017 2017-04-13 23:13:23 +00:00
sanitizers
TableGen [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
Target/ARM
testgen
textmate
unittest [CMake] Fix pthread handling for out-of-tree builds 2017-02-10 01:59:20 +00:00
valgrind
vim vim: add returned keyword 2017-02-10 23:57:11 +00:00
yaml-bench
bisect
bisect-skip-count Fix bug in bisect-skip-count not using passed-in arguments 2017-03-04 03:23:41 +00:00
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
DSAclean.py
DSAextract.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-native-gxx
llvm.grm
LLVMBuild.txt
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py [utils] coverage: Add help text about the --restrict flag (NFC) 2017-02-09 19:37:18 +00:00
schedcover.py
shuffle_fuzz.py
sort_includes.py
test_debuginfo.pl
update_llc_test_checks.py [PPC] Add generated tests for all atomic operations 2017-03-23 16:02:47 +00:00
update_test_checks.py
UpdateCMakeLists.pl
wciia.py