This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver] Unify f18_version.h.in and Version.inc.in
ClosedPublic

Authored by awarzynski on Jan 11 2021, 8:37 AM.

Details

Summary

Flang has two CMake configurable header files that define compiler
version numbers:

  • f18_version.h.in - only used in f18.cpp (uses version numbers from LLVM's macro definitions)
  • Version.inc.in - not currently used (uses version numbers hard-coded in Flang's top CMake script)

Currently only f18_version.h.in provides version numbers consistent with
other subprojects in llvm-project. However, its location and name is
inconsistent with other subprojects (e.g. Clang). This patch merges the
two headers together:

  • hard-coded version numbers in Flang's top CMake script are deleted
  • Version.inc.in is updated to provide string versions of version numbers (required by f18.cpp)
  • f18_version.h.in is deleted as it's no longer needed

Diff Detail

Event Timeline

awarzynski created this revision.Jan 11 2021, 8:37 AM
awarzynski requested review of this revision.Jan 11 2021, 8:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2021, 8:37 AM

LGTM - I think this amounts to some dead code removal at the end of the day. Thanks!

This revision is now accepted and ready to land.Jan 14 2021, 4:46 AM
sameeranjoshi added inline comments.Jan 14 2021, 6:53 AM
flang/tools/f18/f18.cpp
392–394
awarzynski added inline comments.Jan 14 2021, 8:54 AM
flang/tools/f18/f18.cpp
392–394

I missed that, thanks for pointing out! Fixed here: https://reviews.llvm.org/rG0afdbb4d2dead42df14361ca9f5613d56667481c

flang/tools/f18/f18.cpp