Skip to content

Commit faa29ee

Browse files
committed
[Clang] Fix warning on unused varaible
Summary: Don't check the flag this way, it leads to unused variables. Fix.
1 parent 7a45b13 commit faa29ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8429,7 +8429,8 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
84298429
Args.ClaimAllArgs(options::OPT_Xoffload_linker);
84308430

84318431
// Embed bitcode instead of an object in JIT mode.
8432-
if (const Arg *A = Args.getLastArg(options::OPT_fopenmp_target_jit))
8432+
if (Args.hasFlag(options::OPT_fopenmp_target_jit,
8433+
options::OPT_fno_openmp_target_jit, false))
84338434
CmdArgs.push_back("--embed-bitcode");
84348435

84358436
// Forward `-mllvm` arguments to the LLVM invocations if present.

0 commit comments

Comments
 (0)