Skip to content

Commit b47367b

Browse files
RichBarton-Armbryanpkc
authored andcommitted
Fix classic flang version screen
Version screen has been erroneously reporting as flang-new since LLVM 12
1 parent 7acbc39 commit b47367b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,11 @@ void Driver::PrintHelp(bool ShowHidden) const {
20112011

20122012
void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
20132013
if (IsFlangMode()) {
2014+
#ifdef ENABLE_CLASSIC_FLANG
2015+
OS << getClangToolFullVersion("flang") << '\n';
2016+
#else
20142017
OS << getClangToolFullVersion("flang-new") << '\n';
2018+
#endif
20152019
} else {
20162020
// FIXME: The following handlers should use a callback mechanism, we don't
20172021
// know what the client would like to do.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
! REQUIRES: classic-flang
2+
! RUN: %flang --version | FileCheck %s
3+
! CHECK: flang version {{.*}} ({{.*}}flang-compiler/classic-flang-llvm-project.git {{.*}})

0 commit comments

Comments
 (0)