Skip to content

Commit a87bdd4

Browse files
committed
Cleanup and simplify the code a bit
1 parent 5c2f898 commit a87bdd4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,14 +1116,13 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
11161116
return true;
11171117
}
11181118

1119-
// TODO: add -fno-fortran-main option and check it in this function.
11201119
void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,
11211120
llvm::opt::ArgStringList &CmdArgs) {
11221121
// These are handled earlier on Windows by telling the frontend driver to add
11231122
// the correct libraries to link against as dependents in the object file.
11241123
if (!TC.getTriple().isKnownWindowsMSVCEnvironment()) {
11251124
// if -fno-fortran-main has been passed, skip linking Fortran_main.a
1126-
bool DontLinkFortranMain = Args.getLastArg(options::OPT_no_fortran_main) != nullptr;
1125+
bool DontLinkFortranMain = Args.hasArg(options::OPT_no_fortran_main);
11271126
if (!DontLinkFortranMain) {
11281127
// The --whole-archive option needs to be part of the link line to
11291128
// make sure that the main() function from Fortran_main.a is pulled

0 commit comments

Comments
 (0)