summaryrefslogtreecommitdiff
path: root/tools/opt/PassRegistry.def
diff options
context:
space:
mode:
Diffstat (limited to 'tools/opt/PassRegistry.def')
-rw-r--r--tools/opt/PassRegistry.def30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/opt/PassRegistry.def b/tools/opt/PassRegistry.def
new file mode 100644
index 0000000000..6b507f7755
--- /dev/null
+++ b/tools/opt/PassRegistry.def
@@ -0,0 +1,30 @@
+//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is used as the registry of passes that are part of the core LLVM
+// libraries. This file describes both transformation passes and analyses
+// Analyses are registered while transformation passes have names registered
+// that can be used when providing a textual pass pipeline.
+//
+//===----------------------------------------------------------------------===//
+
+// NOTE: NO INCLUDE GUARD DESIRED!
+
+#ifndef MODULE_PASS
+#define MODULE_PASS(NAME, CREATE_PASS)
+#endif
+MODULE_PASS("print", PrintModulePass(dbgs()))
+MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
+#undef MODULE_PASS
+
+#ifndef FUNCTION_PASS
+#define FUNCTION_PASS(NAME, CREATE_PASS)
+#endif
+FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
+#undef FUNCTION_PASS