This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver][nfc] Fix capitalisation
ClosedPublic

Authored by awarzynski on Jan 27 2022, 8:47 AM.

Details

Summary

As pointed out in https://reviews.llvm.org/D93401, some methods in the
Flang driver are named inconsistently. The driver strives to follow
Flang's C++ style [1] and this patch updates these methods accordingly.

[1]
https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md

Diff Detail

Event Timeline

awarzynski created this revision.Jan 27 2022, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 8:47 AM
awarzynski requested review of this revision.Jan 27 2022, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 8:47 AM

Thanks for addressing this quickly.

flang/include/flang/Frontend/CompilerInstance.h
120

What about this one? And the three below?

awarzynski added inline comments.Jan 27 2022, 9:09 AM
flang/include/flang/Frontend/CompilerInstance.h
120

From: https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md#naming

  1. Mutator member functions are named set_...

This patch updates methods that were meant to be named according to:

  1. Other class functions should be named with leading capital letters, CamelCase, and no underscores,

If we were to do this diligently, we'd need to audit all member methods and decide what qualifies as a "mutator" and what is a "class function". Or, IMHO better, one could refactor the driver to use the MLIR style (i.e. one rule for both).

This revision is now accepted and ready to land.Jan 27 2022, 9:22 AM
clementval accepted this revision.Jan 27 2022, 9:32 AM

LGTM

flang/include/flang/Frontend/CompilerInstance.h
120

Ok thanks for the clarification.

This revision was automatically updated to reflect the committed changes.