[PATCH] D21514: Rationalise the attribute getter/setter methods on Function and CallSite.

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 20:53:36 PDT 2016


deadalnix created this revision.
deadalnix added reviewers: bkramer, whitequark, mehdi_amini, void.
deadalnix added a subscriber: llvm-commits.

While woring on mapping attributes in the C API, it clearly appeared that the recent changes in the API on the C++ side left Function and Call/Invoke with an attribute API that grew in an ad hoc manner. This makes it difficult to work with it, because one doesn't know which overloads exists and which do not.

Make sure that getter/setter function exists for both enum and string version. Remove inconsistent getter/setter, unless they have many callsites.

This should make it easier to work with attributes in the future.

This doesn't change how attribute works.

http://reviews.llvm.org/D21514

Files:
  include/llvm/CodeGen/CommandFlags.h
  include/llvm/IR/Attributes.h
  include/llvm/IR/CallSite.h
  include/llvm/IR/Function.h
  include/llvm/IR/Instructions.h
  lib/IR/Attributes.cpp
  lib/IR/Instructions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21514.61232.patch
Type: text/x-patch
Size: 14134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160620/0fcdeeba/attachment.bin>


More information about the llvm-commits mailing list