diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-10-24 17:23:50 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-10-24 17:23:50 +0000 |
commit | 0873bea3ed2d740208131f7f1706b0628c0aae09 (patch) | |
tree | 92ab6be10cb0932e481ca9918d61f0eedc9672aa /tools | |
parent | 270483466124fe1e19d5439e958fef63cebd43cd (diff) |
Opt needs to initialize the different targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/opt/opt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 8d8d73179e..c78f97fa60 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -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 @@ int main(int argc, char **argv) { llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. LLVMContext &Context = getGlobalContext(); + InitializeAllTargets(); + InitializeAllTargetMCs(); + InitializeAllAsmPrinters(); + InitializeAllAsmParsers(); + // Initialize passes PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry); |