[all-commits] [llvm/llvm-project] 6d0fef: [flang][driver] Refactor methods for parsing optio...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Tue Apr 20 07:01:34 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6d0fef48609cbec9579716b77998059501969352
https://github.com/llvm/llvm-project/commit/6d0fef48609cbec9579716b77998059501969352
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2021-04-20 (Tue, 20 Apr 2021)
Changed paths:
M flang/include/flang/Frontend/FrontendOptions.h
M flang/lib/Frontend/CompilerInvocation.cpp
Log Message:
-----------
[flang][driver] Refactor methods for parsing options (nfc)
This is just a small update that makes sure that errors arising from
parsing command-line options are captured more visibly. Also, all
parsing methods will now consistently return either a bool ("may fail")
or void ("never fails").
An instance of `InputKind` coming from `-x` is added to
`FrontendOptions` rather then being returned from `ParseFrontendArgs`.
It's currently not used, but we will require it shortly. In particular,
once code-generation is available we will use it to differentiate
between LLVM IR and Fortran input. `FrontendOptions` is a very suitable
place to keep it.
This changes don't affect the error reporting in the driver. In this
respect these are non-functional-changes. However, it will simplify
things in the forthcoming patches in which we may need a better error
tracking/recovery mechanism.
Differential Revision: https://reviews.llvm.org/D100556
More information about the All-commits
mailing list