[cfe-commits] r80849 - /cfe/trunk/tools/clang-cc/clang-cc.cpp
Daniel Dunbar
daniel at zuster.org
Wed Sep 2 16:20:15 PDT 2009
Author: ddunbar
Date: Wed Sep 2 18:20:15 2009
New Revision: 80849
URL: http://llvm.org/viewvc/llvm-project?rev=80849&view=rev
Log:
Initialize targets before parsing command line options, so --version shows registered targets.
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=80849&r1=80848&r2=80849&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Wed Sep 2 18:20:15 2009
@@ -2162,11 +2162,13 @@
llvm::sys::PrintStackTraceOnErrorSignal();
llvm::PrettyStackTraceProgram X(argc, argv);
llvm::LLVMContext &Context = llvm::getGlobalContext();
- llvm::cl::ParseCommandLineOptions(argc, argv,
- "LLVM 'Clang' Compiler: http://clang.llvm.org\n");
-
+
+ // Initialize targets first.
llvm::InitializeAllTargets();
llvm::InitializeAllAsmPrinters();
+
+ llvm::cl::ParseCommandLineOptions(argc, argv,
+ "LLVM 'Clang' Compiler: http://clang.llvm.org\n");
if (TimeReport)
ClangFrontendTimer = new llvm::Timer("Clang front-end time");
More information about the cfe-commits
mailing list