[cfe-commits] r80849 - /cfe/trunk/tools/clang-cc/clang-cc.cpp
Chris Lattner
clattner at apple.com
Wed Sep 2 20:09:58 PDT 2009
On Sep 2, 2009, at 4:20 PM, Daniel Dunbar wrote:
> 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.
How about "// Initialize targets first, so that --version shows
registered targets."
-Chris
>
> 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");
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list