summaryrefslogtreecommitdiff
path: root/tools/llc/llc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llc/llc.cpp')
-rw-r--r--tools/llc/llc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 44f83e1b30..9b3ef8144c 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -353,6 +353,10 @@ int main(int argc, char **argv) {
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
+ // Initialize codegen so that the -print-after and -print-before options
+ // work.
+ initializeCodeGen(*PassRegistry::getPassRegistry());
+
// Register the target printer for --version.
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);