summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llc')
-rw-r--r--llvm/tools/llc/llc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 34587173ab9..304638c52f7 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -210,10 +210,12 @@ int main(int argc, char **argv) {
PrettyStackTraceProgram X(argc, argv);
LLVMContext &Context = getGlobalContext();
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
- cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n");
+ // Initialize targets first.
InitializeAllTargets();
InitializeAllAsmPrinters();
+
+ cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n");
// Load the module to be compiled...
std::string ErrorMessage;
OpenPOWER on IntegriCloud