[flang-commits] [PATCH] D84334: Version information in flang/f18

Alexis Perry-Holby via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jul 28 08:24:32 PDT 2020


AlexisPerry added a comment.

@richard.barton.arm, I don't think I have any code that relies on `__F18` being defined, so I'm alright with removing it and the related macros.  You also make a very good point about following clang behavior.  I wasn't aware of clang's use of lowercase macros and just assumed everyone uses uppercase macros based on my previous experiences with other codes.  I think your proposal is likely the better way to go, first because matching style across LLVM projects is generally a good thing and second because your proposal does not require changes to classic Flang so we don't have to impose on those developers.

Also, +1 on cherry picking this patch to the LLVM 11 release branch once it is merged.



================
Comment at: flang/tools/f18/f18.cpp:392
+int printVersion(){
+  llvm::errs() << "\nf18 compiler (under development)\n";
+  return exitStatus;
----------------
If we adopt @richard.barton.arm's proposal, I think it would be a good idea to make use of the `__flang_version__` macro here so that the output actually prints the version number.


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

https://reviews.llvm.org/D84334



More information about the flang-commits mailing list