summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Writer.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-07 12:34:26 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-07 12:34:26 +0000
commitbc65a8d518ebe0408deb15d9314fd2ff5cbd0686 (patch)
tree82bd288d014ea25cb1c5ec67387c1d2eb438e517 /include/llvm/IR/Writer.h
parent974a445bd90795248274493eda5cdbf6721910f7 (diff)
downloadllvm-bc65a8d518ebe0408deb15d9314fd2ff5cbd0686.tar.gz
llvm-bc65a8d518ebe0408deb15d9314fd2ff5cbd0686.tar.bz2
llvm-bc65a8d518ebe0408deb15d9314fd2ff5cbd0686.tar.xz
Move the LLVM IR asm writer header files into the IR directory, as they
are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/Writer.h')
-rw-r--r--include/llvm/IR/Writer.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/llvm/IR/Writer.h b/include/llvm/IR/Writer.h
new file mode 100644
index 0000000000..d1685e96dc
--- /dev/null
+++ b/include/llvm/IR/Writer.h
@@ -0,0 +1,37 @@
+//===-- Writer.h - Printer for LLVM IR assembly files -------------*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This functionality is implemented by lib/IR/AsmWriter.cpp.
+// This library is used to print LLVM assembly language files to an iostream. It
+// can print LLVM code at a variety of granularities, including Modules,
+// BasicBlocks, and Instructions. This makes it useful for debugging.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_IR_WRITER_H
+#define LLVM_IR_WRITER_H
+
+namespace llvm {
+
+class Module;
+class Value;
+class raw_ostream;
+
+// WriteAsOperand - Write the name of the specified value out to the specified
+// ostream. This can be useful when you just want to print int %reg126, not the
+// whole instruction that generated it. If you specify a Module for context,
+// then even constants get pretty-printed; for example, the type of a null
+// pointer is printed symbolically.
+//
+void WriteAsOperand(raw_ostream &, const Value *, bool PrintTy = true,
+ const Module *Context = 0);
+
+} // End llvm namespace
+
+#endif