[all-commits] [llvm/llvm-project] 9ffb5b: [flang][driver] Rename the accessors/mutators (NFC)

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Mon Nov 2 03:29:08 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ffb5b0469ae593f8b7e1d7d9ef6ea46cd366e6e
      https://github.com/llvm/llvm-project/commit/9ffb5b0469ae593f8b7e1d7d9ef6ea46cd366e6e
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2020-11-02 (Mon, 02 Nov 2020)

  Changed paths:
    M flang/include/flang/Frontend/CompilerInstance.h
    M flang/include/flang/Frontend/CompilerInvocation.h
    M flang/include/flang/Frontend/FrontendAction.h
    M flang/include/flang/Frontend/FrontendOptions.h
    M flang/lib/Frontend/CompilerInstance.cpp
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendAction.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
    M flang/tools/flang-driver/fc1_main.cpp
    M flang/unittests/Frontend/CompilerInstanceTest.cpp
    M flang/unittests/Frontend/InputOutputTest.cpp

  Log Message:
  -----------
  [flang][driver] Rename the accessors/mutators (NFC)

As per point 3 in [1]:

```
Accessor member functions are named with the non-public data member's
name, less the trailing underscore.  Mutator member functions are named
set_...
```

Originally we just followed the LLVM's style, which is incompatible with
Flang. This patch renames the accessors and mutators accordingly.

`getDiagnostics` and `GetDiagnostics` are replaced with one accessor:
`diagnostics`. `SetDiagnostics` was neither implemented nor used, so
it's deleted.

[1] https://github.com/llvm/llvm-project/blob/master/flang/docs/C++style.md#naming

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




More information about the All-commits mailing list