LLVM API Documentation

Writer.h

Go to the documentation of this file.
00001 //===-- llvm/Assembly/Writer.h - Printer for LLVM assembly files --*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This functionality is implemented by lib/VMCore/AsmWriter.cpp.
00011 // This library is used to print LLVM assembly language files to an iostream. It
00012 // can print LLVM code at a variety of granularities, including Modules,
00013 // BasicBlocks, and Instructions.  This makes it useful for debugging.
00014 //
00015 //===----------------------------------------------------------------------===//
00016 
00017 #ifndef LLVM_ASSEMBLY_WRITER_H
00018 #define LLVM_ASSEMBLY_WRITER_H
00019 
00020 #include <iosfwd>
00021 
00022 namespace llvm {
00023 
00024 class Type;
00025 class Module;
00026 class Value;
00027 class raw_ostream;
00028 
00029 // WriteTypeSymbolic - This attempts to write the specified type as a symbolic
00030 // type, iff there is an entry in the Module's symbol table for the specified
00031 // type or one of its component types.  This is slower than a simple x << Type;
00032 //
00033 void WriteTypeSymbolic(std::ostream &, const Type *, const Module *M);
00034 void WriteTypeSymbolic(raw_ostream &, const Type *, const Module *M);
00035 
00036 // WriteAsOperand - Write the name of the specified value out to the specified
00037 // ostream.  This can be useful when you just want to print int %reg126, not the
00038 // whole instruction that generated it.  If you specify a Module for context,
00039 // then even constants get pretty-printed; for example, the type of a null
00040 // pointer is printed symbolically.
00041 //
00042 void WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true,
00043                     const Module *Context = 0);
00044 void WriteAsOperand(raw_ostream &, const Value *, bool PrintTy = true,
00045                     const Module *Context = 0);
00046 
00047 } // End llvm namespace
00048 
00049 #endif