summaryrefslogtreecommitdiff
path: root/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-as/llvm-as.cpp')
-rw-r--r--tools/llvm-as/llvm-as.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index b2e44ef9d3..9d5e96d965 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -20,6 +20,7 @@
#include "llvm/Assembly/Parser.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Module.h"
+#include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
@@ -89,6 +90,10 @@ int main(int argc, char **argv) {
PrettyStackTraceProgram X(argc, argv);
LLVMContext &Context = getGlobalContext();
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
+
+ // Initialize PassManager for -time-passes support.
+ initializePassManager();
+
cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
// Parse the file now...