HomePhabricator

Rationalise the attribute getter/setter methods on Function and CallSite.

Authored by Amaury Sechet <deadalnix@gmail.com> on Sep 8 2016, 9:50 PM.

Description

Rationalise the attribute getter/setter methods on Function and CallSite.

Summary:
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.

Reviewers: bkramer, whitequark, mehdi_amini, void

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21514

llvm-svn: 281019

Event Timeline

Amaury Sechet <deadalnix@gmail.com> committed rG5f04d819a55a: Rationalise the attribute getter/setter methods on Function and CallSite. (authored by Amaury Sechet <deadalnix@gmail.com>).Sep 8 2016, 9:50 PM