From bc65a8d518ebe0408deb15d9314fd2ff5cbd0686 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 7 Jan 2014 12:34:26 +0000 Subject: 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 --- include/llvm/IR/Writer.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/llvm/IR/Writer.h (limited to 'include/llvm/IR/Writer.h') 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 -- cgit v1.2.3