[llvm-commits] [llvm] r166595 - /llvm/trunk/tools/opt/opt.cpp

Nadav Rotem nrotem at apple.com
Wed Oct 24 10:23:51 PDT 2012


Author: nadav
Date: Wed Oct 24 12:23:50 2012
New Revision: 166595

URL: http://llvm.org/viewvc/llvm-project?rev=166595&view=rev
Log:
Opt needs to initialize the different targets.

Modified:
    llvm/trunk/tools/opt/opt.cpp

Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=166595&r1=166594&r2=166595&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Wed Oct 24 12:23:50 2012
@@ -39,6 +39,7 @@
 #include "llvm/Support/SystemUtils.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/ToolOutputFile.h"
+#include "llvm/Support/TargetSelect.h"
 #include "llvm/MC/SubtargetFeature.h"
 #include "llvm/LinkAllPasses.h"
 #include "llvm/LinkAllVMCore.h"
@@ -564,6 +565,11 @@
   llvm_shutdown_obj Y;  // Call llvm_shutdown() on exit.
   LLVMContext &Context = getGlobalContext();
 
+  InitializeAllTargets();
+  InitializeAllTargetMCs();
+  InitializeAllAsmPrinters();
+  InitializeAllAsmParsers();
+
   // Initialize passes
   PassRegistry &Registry = *PassRegistry::getPassRegistry();
   initializeCore(Registry);





More information about the llvm-commits mailing list