[all-commits] [llvm/llvm-project] d902dd: [flang][driver] NFC: Make code more in line with L...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Wed Apr 27 02:20:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d902dd011c9403ff746613a73c5d83e13db93fe5
      https://github.com/llvm/llvm-project/commit/d902dd011c9403ff746613a73c5d83e13db93fe5
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2022-04-27 (Wed, 27 Apr 2022)

  Changed paths:
    M flang/include/flang/Frontend/FrontendOptions.h
    M flang/include/flang/FrontendTool/Utils.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendAction.cpp
    M flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp

  Log Message:
  -----------
  [flang][driver] NFC: Make code more in line with LLVM style

This patch basically implements [1] in ExecuteCompilerInvocation.cpp. It
also:
  * replaces `CreateFrontendBaseAction` with `CreateFrontendAction`
    (only one method is needed ATM, this change removes the extra
    indirection)
  * removes `InvalidAction` from the `ActionKind` enum (I don't think it
    adds much and keeping it would mean adding a new void case in
    `CreateFrontendAction`)
  * sets the default frontend action in FrontendOptions.h to
    `ParseSyntaxOnly` (note that this is still overridden independently
    in `ParseFrontendArg` in CompilerInvocation.cpp)

No new functionality is added, hence no tests.

[1] https://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

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




More information about the All-commits mailing list