[PATCH] D64121: Rename variables so that they start with a lowercase letter.

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 02:28:19 PDT 2019


peter.smith added a comment.

In general I think a move to camelCase or snake_case is an improvement, don't have a particularly strong opinion over which one. I suspect that the camelCase transition is easier to automate. With just a quick scan of some of the output there are a few cases where some of the variable names are used as acronyms ISD -> InputSectionDescription. Or IS -> InputSection. I don't think that these survive the transition well, in particular IS -> is. I've not got a great idea for what to do about these right now, some possible options:

- Do the full renaming as above and change the variable names later. Presumably it would help to be consistent.
- Don't rename common acronyms like IS and change the variable names later.
- Allow common acronyms to stay capitalised.
- Have some custom renames for acronyms like IS.

I don't have a particularly strong opinion on which option. It would be helpful to be consistent though.

The other case where we may want to look at is use of capitals like S, P and A in relocation processing as these match the ELF specification. Of course we could use sym, place, addend instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64121/new/

https://reviews.llvm.org/D64121





More information about the llvm-commits mailing list