r225095 - Also avoid warning on -flto/-fno-lto on linux.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jan 2 15:23:52 PST 2015
Author: rafael
Date: Fri Jan 2 17:23:52 2015
New Revision: 225095
URL: http://llvm.org/viewvc/llvm-project?rev=225095&view=rev
Log:
Also avoid warning on -flto/-fno-lto on linux.
On OS X a .s file is preprocessed, it is not on linux, which is why the warning was still
showing up on linux but not OS X.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=225095&r1=225094&r2=225095&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jan 2 17:23:52 2015
@@ -3379,8 +3379,8 @@ void Clang::ConstructJob(Compilation &C,
D.Diag(diag::warn_ignored_gcc_optimization) << (*it)->getAsString(Args);
}
- // Don't warn about unused -f(no-)?lto. This can happen when we're preprocessing,
- // precompiling or assembling.
+ // Don't warn about unused -f(no-)?lto. This can happen when we're preprocessing or
+ // precompiling.
Args.ClaimAllArgs(options::OPT_flto);
Args.ClaimAllArgs(options::OPT_fno_lto);
@@ -4810,6 +4810,11 @@ void ClangAs::ConstructJob(Compilation &
// and "clang -emit-llvm -c foo.s"
Args.ClaimAllArgs(options::OPT_emit_llvm);
+ // Don't warn on -flto/-fno-lto
+ // FIXME: Code duplicated with Clang::ConstructJob.
+ Args.ClaimAllArgs(options::OPT_flto);
+ Args.ClaimAllArgs(options::OPT_fno_lto);
+
// Invoke ourselves in -cc1as mode.
//
// FIXME: Implement custom jobs for internal actions.
More information about the cfe-commits
mailing list