[PATCH] D100556: [flang][driver] Refactor methods for parsing options (nfc)

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 04:20:49 PDT 2021


awarzynski added a comment.

Thank you for reviewing @SouraVX !



================
Comment at: flang/include/flang/Frontend/FrontendOptions.h:225
 
+  /// The input kind, either specified via -x argument or deduced from the input
+  /// file name.
----------------
SouraVX wrote:
> SouraVX wrote:
> > Out of curiosity, what does clang does for this ?
> > ```
> > clang -x c++ main.c
> > ```
> > Is sharing possible ?
> I meant what clangDriver does, for handling this ? Code sharing possible ?
> I meant what clangDriver does, for handling this ? Code sharing possible ?

Not without some non-trivial refactor. This code is for the frontend driver. clangDriver is only used for the compiler driver. It's the same in Clang.

I agree that it would be nice to share some code from the frontend driver with Clang.  And in theory it shouldn't be too difficult - one would simply create a few generic/abstract classes that Flang and Clang would specialise. But the devil is going to be in the details.  Also, we need a volunteer first :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100556



More information about the llvm-commits mailing list