dea44d07cba59b3d87adf0324ae78c4df0903f6a
[oota-llvm.git] / include / llvm / Assembly / Writer.h
1 //===-- llvm/Assembly/Writer.h - Printer for VM assembly files --*- C++ -*-===//
2 //
3 // This functionality is implemented by the lib/Assembly/Writer library.
4 // This library is used to print VM assembly language files to an iostream. It
5 // can print VM code at a variety of granularities, ranging from a whole class
6 // down to an individual instruction.  This makes it useful for debugging.
7 //
8 // This file also defines functions that allow it to output files that a program
9 // called VCG can read.
10 //
11 // This library uses the Analysis library to figure out offsets for
12 // variables in the method tables...
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_ASSEMBLY_WRITER_H
17 #define LLVM_ASSEMBLY_WRITER_H
18
19 #include <iosfwd>
20 class Type;
21 class Module;
22 class Value;
23
24 // WriteTypeSymbolic - This attempts to write the specified type as a symbolic
25 // type, iff there is an entry in the modules symbol table for the specified
26 // type or one of it's component types.  This is slower than a simple x << Type;
27 //
28 std::ostream &WriteTypeSymbolic(std::ostream &, const Type *, const Module *M);
29
30 // WriteAsOperand - Write the name of the specified value out to the specified
31 // ostream.  This can be useful when you just want to print int %reg126, not the
32 // whole instruction that generated it.  If you specify a Module for context,
33 // then even constants get pretty printed (for example the type of a null 
34 // pointer is printed symbolically).
35 //
36 std::ostream &WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true,
37                              bool PrintName = true, const Module *Context = 0);
38
39 #endif