[cfe-commits] r89074 - /cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Daniel Dunbar
daniel at zuster.org
Tue Nov 17 01:15:58 PST 2009
Author: ddunbar
Date: Tue Nov 17 03:15:57 2009
New Revision: 89074
URL: http://llvm.org/viewvc/llvm-project?rev=89074&view=rev
Log:
Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=89074&r1=89073&r2=89074&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Nov 17 03:15:57 2009
@@ -377,8 +377,8 @@
// BCPLComment, C99, CPlusPlus0x, Digraphs, GNUInline, ImplicitInt, GNUMode
if (Opts.DollarIdents)
Res.push_back("-fdollars-in-identifiers");
- Res.push_back("-fms-extensions");
- Res.push_back(Opts.Microsoft ? "1" : "0");
+ if (Opts.Microsoft)
+ Res.push_back("-fms-extensions=1");
if (Opts.ObjCNonFragileABI)
Res.push_back("-fobjc-nonfragile-abi");
// NoInline is implicit.
@@ -406,12 +406,12 @@
llvm::llvm_report_error("FIXME: Not yet implemented!");
if (Opts.POSIXThreads)
Res.push_back("-pthread");
- Res.push_back("-fblocks");
- Res.push_back(Opts.Blocks ? "1" : "0");
+ if (Opts.Blocks)
+ Res.push_back("-fblocks=1");
if (Opts.EmitAllDecls)
Res.push_back("-femit-all-decls");
- Res.push_back("-fmath-errno");
- Res.push_back(Opts.MathErrno ? "1" : "0");
+ if (!Opts.MathErrno)
+ Res.push_back("-fmath-errno=0");
if (Opts.OverflowChecking)
Res.push_back("-ftrapv");
if (Opts.HeinousExtensions)
More information about the cfe-commits
mailing list