Skip to content

Commit 720c2ed

Browse files
everythingfunctionalh-vetinaribanach-space
authored andcommitted
[flang][driver] rename flang-new to flang (llvm#110023)
This does a global rename from `flang-new` to `flang`. I also removed/changed any TODOs that I found related to making this change. --------- Co-authored-by: H. Vetinari <[email protected]> Co-authored-by: Andrzej Warzynski <[email protected]>
1 parent 82b836e commit 720c2ed

File tree

81 files changed

+270
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+270
-261
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6313,7 +6313,7 @@ def _sysroot_EQ : Joined<["--"], "sysroot=">, Visibility<[ClangOption, FlangOpti
63136313
def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
63146314

63156315
//===----------------------------------------------------------------------===//
6316-
// pie/pic options (clang + flang-new)
6316+
// pie/pic options (clang + flang)
63176317
//===----------------------------------------------------------------------===//
63186318
let Visibility = [ClangOption, FlangOption] in {
63196319

@@ -6329,7 +6329,7 @@ def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
63296329
} // let Vis = [Default, FlangOption]
63306330

63316331
//===----------------------------------------------------------------------===//
6332-
// Target Options (clang + flang-new)
6332+
// Target Options (clang + flang)
63336333
//===----------------------------------------------------------------------===//
63346334
let Flags = [TargetSpecific] in {
63356335
let Visibility = [ClangOption, FlangOption] in {

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ void Driver::PrintHelp(bool ShowHidden) const {
22892289

22902290
void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
22912291
if (IsFlangMode()) {
2292-
OS << getClangToolFullVersion("flang-new") << '\n';
2292+
OS << getClangToolFullVersion("flang") << '\n';
22932293
} else {
22942294
// FIXME: The following handlers should use a callback mechanism, we don't
22952295
// know what the client would like to do.

clang/lib/Driver/README_amd_driver_trunk_diffs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subsystems.
1717
These are the areas where amd-staging differs from the trunk:
1818

1919
- Support for legacy/classic flang driver. This will eventually go away
20-
when llvm flang (flang-new) is in production.
20+
when llvm flang (flang) is in production.
2121

2222
- Support for the generation of parallel jobs. Unless someone upstreams
2323
this support, this difference will remain.

clang/lib/Driver/ToolChain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t &Pos) {
428428
{"cl", "--driver-mode=cl"},
429429
{"++", "--driver-mode=g++"},
430430
{"flang", "--driver-mode=flang"},
431+
// For backwards compatibility, we create a symlink for `flang` called
432+
// `flang`. This will be removed in the future.
433+
{"flang", "--driver-mode=flang"},
431434
{"clang-dxc", "--driver-mode=dxc"},
432435
};
433436

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9103,7 +9103,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
91039103
assert(Input.isFilename() && "Invalid input.");
91049104
CmdArgs.push_back(Input.getFilename());
91059105

9106-
// TODO This is a workaround to enable using -save-temps with flang-new
9106+
// TODO This is a workaround to enable using -save-temps with flang
91079107
// const char *Exec = getToolChain().getDriver().getClangProgramPath();
91089108
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("clang"));
91099109
if (D.CC1Main && !D.CCGenDiagnostics) {

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,14 +1014,12 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
10141014
checkForAMDProprietaryOptOptions(TC, D, Args, CmdArgs, false /*isLLD*/,
10151015
false /*checkOnly*/);
10161016

1017-
// TODO: Replace flang-new with flang once the new driver replaces the
1018-
// throwaway driver
1019-
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC));
1017+
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
10201018
C.addCommand(std::make_unique<Command>(JA, *this,
10211019
ResponseFileSupport::AtFileUTF8(),
10221020
Exec, CmdArgs, Inputs, Output));
10231021
}
10241022

1025-
Flang::Flang(const ToolChain &TC) : Tool("flang-new", "flang frontend", TC) {}
1023+
Flang::Flang(const ToolChain &TC) : Tool("flang", "flang frontend", TC) {}
10261024

10271025
Flang::~Flang() {}

clang/test/Driver/flang/flang.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
! * (no type specified, resulting in an object file)
1717

1818
! All invocations should begin with flang -fc1, consume up to here.
19-
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
19+
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
2020

2121
! Check that f90 files are not treated as "previously preprocessed"
2222
! ... in --driver-mode=flang.

clang/test/Driver/flang/flang_ucase.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
! * (no type specified, resulting in an object file)
1717

1818
! All invocations should begin with flang -fc1, consume up to here.
19-
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
19+
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
2020

2121
! Check that f90 files are not treated as "previously preprocessed"
2222
! ... in --driver-mode=flang.

clang/test/Driver/flang/multiple-inputs-mixed.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
! UNSUPPORTED
55

66
! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/other.c 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
7-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
7+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
88
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
99
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}clang{{[^"/]*}}" "-cc1"
1010
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/other.c"

clang/test/Driver/flang/multiple-inputs.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
! UNSUPPORTED
55

66
! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/two.f90 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
7-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
7+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
88
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
9-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
9+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
1010
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/two.f90"

0 commit comments

Comments
 (0)