[flang][driver] Add standard macro predefinitions for compiler version
authorFaris Rehman <faris.rehman@arm.com>
Tue, 19 Jan 2021 13:15:53 +0000 (13:15 +0000)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 19 Jan 2021 13:22:59 +0000 (13:22 +0000)
commit197d9a55f105391f34a0657e6c1d5ef3166dad7d
tree823674856676eca1f5d6c7aece1337e83334e742
parenta60bc55c693609e9417419b72754b9984f52acbe
[flang][driver] Add standard macro predefinitions for compiler version

Add the following standard predefinitions that f18 supports:
  * `__flang__`,
  * `__flang_major__`,
  * `__flang_minor__`,
  * `__flang_patchlevel__`

Summary of changes:
- Populate Fortran::parser::Options#predefinitions with the default
  supported predefinitions

Differential Revision: https://reviews.llvm.org/D94516
flang/lib/Frontend/CompilerInvocation.cpp
flang/test/Flang-Driver/predefined-macros-compiler-version.f90 [new file with mode: 0644]