[cfe-commits] r86710 - /cfe/trunk/tools/clang-cc/clang-cc.cpp
Daniel Dunbar
daniel at zuster.org
Tue Nov 10 11:51:47 PST 2009
Author: ddunbar
Date: Tue Nov 10 13:51:46 2009
New Revision: 86710
URL: http://llvm.org/viewvc/llvm-project?rev=86710&view=rev
Log:
clang-cc: Sink more options inside codegenopts namespace.
Modified:
cfe/trunk/tools/clang-cc/clang-cc.cpp
Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=86710&r1=86709&r2=86710&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Tue Nov 10 13:51:46 2009
@@ -616,10 +616,6 @@
DollarsInIdents("fdollars-in-identifiers",
llvm::cl::desc("Allow '$' in identifiers"));
-
-static llvm::cl::opt<bool>
-OptSize("Os", llvm::cl::desc("Optimize for size"));
-
static llvm::cl::opt<bool>
DisableLLVMOptimizations("disable-llvm-optzns",
llvm::cl::desc("Don't run LLVM optimization passes"));
@@ -645,22 +641,6 @@
llvm::cl::desc("Specify target triple (e.g. i686-apple-darwin9)"));
-// It might be nice to add bounds to the CommandLine library directly.
-struct OptLevelParser : public llvm::cl::parser<unsigned> {
- bool parse(llvm::cl::Option &O, llvm::StringRef ArgName,
- llvm::StringRef Arg, unsigned &Val) {
- if (llvm::cl::parser<unsigned>::parse(O, ArgName, Arg, Val))
- return true;
- if (Val > 3)
- return O.error("'" + Arg + "' invalid optimization level!");
- return false;
- }
-};
-static llvm::cl::opt<unsigned, false, OptLevelParser>
-OptLevel("O", llvm::cl::Prefix,
- llvm::cl::desc("Optimization level"),
- llvm::cl::init(0));
-
static llvm::cl::opt<unsigned>
PICLevel("pic-level", llvm::cl::desc("Value for __PIC__"));
@@ -1261,6 +1241,25 @@
NoMergeConstants("fno-merge-all-constants",
llvm::cl::desc("Disallow merging of constants."));
+// It might be nice to add bounds to the CommandLine library directly.
+struct OptLevelParser : public llvm::cl::parser<unsigned> {
+ bool parse(llvm::cl::Option &O, llvm::StringRef ArgName,
+ llvm::StringRef Arg, unsigned &Val) {
+ if (llvm::cl::parser<unsigned>::parse(O, ArgName, Arg, Val))
+ return true;
+ if (Val > 3)
+ return O.error("'" + Arg + "' invalid optimization level!");
+ return false;
+ }
+};
+static llvm::cl::opt<unsigned, false, OptLevelParser>
+OptLevel("O", llvm::cl::Prefix,
+ llvm::cl::desc("Optimization level"),
+ llvm::cl::init(0));
+
+static llvm::cl::opt<bool>
+OptSize("Os", llvm::cl::desc("Optimize for size"));
+
static llvm::cl::opt<std::string>
TargetCPU("mcpu",
llvm::cl::desc("Target a specific cpu type (-mcpu=help for details)"));
More information about the cfe-commits
mailing list