It is somewhat common for CFLAGS to be used with .s files. We were
already ignoring -flto. This patch just does the same for -fno-lto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225093
91177308-0d34-0410-b5e6-
96231b3b80d8
D.Diag(diag::warn_ignored_gcc_optimization) << (*it)->getAsString(Args);
}
- // Don't warn about unused -flto. This can happen when we're preprocessing or
- // precompiling.
+ // Don't warn about unused -f(no-)?lto. This can happen when we're preprocessing,
+ // precompiling or assembling.
Args.ClaimAllArgs(options::OPT_flto);
+ Args.ClaimAllArgs(options::OPT_fno_lto);
Args.AddAllArgs(CmdArgs, options::OPT_R_Group);
Args.AddAllArgs(CmdArgs, options::OPT_W_Group);
--- /dev/null
+// RUN: %clang -### -c -Werror -flto -fno-lto %s 2>&1 | FileCheck %s
+
+// CHECK-NOT: argument unused during compilation