[cfe-commits] r67047 - /cfe/trunk/Driver/clang.cpp
Chris Lattner
sabre at nondot.org
Mon Mar 16 11:41:18 PDT 2009
Author: lattner
Date: Mon Mar 16 13:41:18 2009
New Revision: 67047
URL: http://llvm.org/viewvc/llvm-project?rev=67047&view=rev
Log:
simplify this code by reading the decision from LangOptions instead
of recomputing the property from command line options.
Modified:
cfe/trunk/Driver/clang.cpp
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=67047&r1=67046&r2=67047&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Mon Mar 16 13:41:18 2009
@@ -1191,7 +1191,8 @@
TargetCPU("mcpu",
llvm::cl::desc("Target a specific cpu type (-mcpu=help for details)"));
-static void InitializeCompileOptions(CompileOptions &Opts) {
+static void InitializeCompileOptions(CompileOptions &Opts,
+ const LangOptions &LangOpts) {
Opts.OptimizeSize = OptSize;
Opts.DebugInfo = GenerateDebugInfo;
if (OptSize) {
@@ -1205,7 +1206,7 @@
// FIXME: There are llvm-gcc options to control these selectively.
Opts.InlineFunctions = (Opts.OptimizationLevel > 1);
Opts.UnrollLoops = (Opts.OptimizationLevel > 1 && !OptSize);
- Opts.SimplifyLibCalls = !NoBuiltin && !Freestanding;
+ Opts.SimplifyLibCalls = !LangOpts.NoBuiltin;
#ifdef NDEBUG
Opts.VerifyModule = 0;
@@ -1272,7 +1273,7 @@
Act = Backend_EmitBC;
CompileOptions Opts;
- InitializeCompileOptions(Opts);
+ InitializeCompileOptions(Opts, LangOpts);
return CreateBackendConsumer(Act, Diag, LangOpts, Opts,
InFile, OutputFile);
}
More information about the cfe-commits
mailing list