Skip to content

Commit

Permalink
Address 2nd comments from jansvoboda11
Browse files Browse the repository at this point in the history
  • Loading branch information
kyulee-com committed Sep 12, 2024
1 parent dbab3cc commit d0a95a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2755,10 +2755,8 @@ void tools::addMachineOutlinerArgs(const Driver &D,
}

auto *CodeGenDataGenArg =
Args.getLastArg(options::OPT_fcodegen_data_generate,
options::OPT_fcodegen_data_generate_EQ);
auto *CodeGenDataUseArg = Args.getLastArg(options::OPT_fcodegen_data_use,
options::OPT_fcodegen_data_use_EQ);
Args.getLastArg(options::OPT_fcodegen_data_generate_EQ);
auto *CodeGenDataUseArg = Args.getLastArg(options::OPT_fcodegen_data_use_EQ);

// We only allow one of them to be specified.
if (CodeGenDataGenArg && CodeGenDataUseArg)
Expand Down
9 changes: 3 additions & 6 deletions clang/lib/Driver/ToolChains/Darwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,7 @@ void darwin::Linker::AddLinkArgs(Compilation &C, const ArgList &Args,
}

auto *CodeGenDataGenArg =
Args.getLastArg(options::OPT_fcodegen_data_generate,
options::OPT_fcodegen_data_generate_EQ);
Args.getLastArg(options::OPT_fcodegen_data_generate_EQ);
if (CodeGenDataGenArg) {
SmallString<128> Path(CodeGenDataGenArg->getNumValues() == 0
? ""
Expand Down Expand Up @@ -648,10 +647,8 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,

// Propagate codegen data flags to the linker for the LLVM backend.
auto *CodeGenDataGenArg =
Args.getLastArg(options::OPT_fcodegen_data_generate,
options::OPT_fcodegen_data_generate_EQ);
auto *CodeGenDataUseArg = Args.getLastArg(options::OPT_fcodegen_data_use,
options::OPT_fcodegen_data_use_EQ);
Args.getLastArg(options::OPT_fcodegen_data_generate_EQ);
auto *CodeGenDataUseArg = Args.getLastArg(options::OPT_fcodegen_data_use_EQ);

// We only allow one of them to be specified.
const Driver &D = getToolChain().getDriver();
Expand Down

0 comments on commit d0a95a6

Please sign in to comment.