Skip to content

Commit b8b710a

Browse files
Fix clang format
1 parent cd77b21 commit b8b710a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5606,26 +5606,26 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
56065606
CmdArgs.push_back("-Wno-sycl-strict");
56075607
}
56085608

5609-
// If no optimization controlling flags (-O) are provided, check if
5610-
// any debug information flags(-g) are passed.
5611-
// "-fintelfpga" implies "-g" and we preserve the default optimization for
5612-
// this flow(-O2).
5613-
// if "-g" is explicitly passed from the command-line, set default
5614-
// optimization to -O0.
5615-
5616-
if (!Args.hasArgNoClaim(options::OPT_O_Group, options::OPT__SLASH_O)) {
5617-
StringRef OptLevel = "-O2";
5618-
const Arg *DebugInfoGroup = Args.getLastArg(options::OPT_g_Group);
5619-
// -fintelfpga -g case
5620-
if ((Args.hasArg(options::OPT_fintelfpga) &&
5621-
Args.hasMultipleArgs(options::OPT_g_Group)) ||
5622-
/* -fsycl -g case */ (!Args.hasArg(options::OPT_fintelfpga) &&
5623-
DebugInfoGroup)) {
5624-
if (!DebugInfoGroup->getOption().matches(options::OPT_g0)) {
5625-
OptLevel = "-O0";
5609+
// If no optimization controlling flags (-O) are provided, check if
5610+
// any debug information flags(-g) are passed.
5611+
// "-fintelfpga" implies "-g" and we preserve the default optimization for
5612+
// this flow(-O2).
5613+
// if "-g" is explicitly passed from the command-line, set default
5614+
// optimization to -O0.
5615+
5616+
if (!Args.hasArgNoClaim(options::OPT_O_Group, options::OPT__SLASH_O)) {
5617+
StringRef OptLevel = "-O2";
5618+
const Arg *DebugInfoGroup = Args.getLastArg(options::OPT_g_Group);
5619+
// -fintelfpga -g case
5620+
if ((Args.hasArg(options::OPT_fintelfpga) &&
5621+
Args.hasMultipleArgs(options::OPT_g_Group)) ||
5622+
/* -fsycl -g case */ (!Args.hasArg(options::OPT_fintelfpga) &&
5623+
DebugInfoGroup)) {
5624+
if (!DebugInfoGroup->getOption().matches(options::OPT_g0)) {
5625+
OptLevel = "-O0";
5626+
}
56265627
}
5627-
}
5628-
CmdArgs.push_back(OptLevel.data());
5628+
CmdArgs.push_back(OptLevel.data());
56295629
}
56305630

56315631
// Add the integration header option to generate the header.

0 commit comments

Comments
 (0)