aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-06-26 21:33:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-06-26 21:33:36 +0000
commit275c85f1a7d04cf1dc6c166211dc2d72fea43c0d (patch)
treee4d796bad2b61ad0833f1529aef4bd3233190e52 /tools
parent1f7a1b68a07ea6bdf521525a7928f4a8c5216713 (diff)
Fix llc's -print-before=pass and -print-after=pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-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);