Skip to content

Commit b2c0887

Browse files
author
Chad Rosier
committed
[driver] Don't warn about an unused -flto option.
rdar://12851905 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170010 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 4f69eb4 commit b2c0887

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Driver/Tools.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,6 +2281,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
22812281
A->render(Args, CmdArgs);
22822282
}
22832283

2284+
// Don't warn about unused -flto. This can happen when we're preprocessing or
2285+
// precompiling.
2286+
Args.ClaimAllArgs(options::OPT_flto);
2287+
22842288
Args.AddAllArgs(CmdArgs, options::OPT_W_Group);
22852289
if (Args.hasFlag(options::OPT_pedantic, options::OPT_no_pedantic, false))
22862290
CmdArgs.push_back("-pedantic");

0 commit comments

Comments
 (0)