07671a18a50f15f9096762517aca9a3bdc410247
[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 class SlotCalculator;
24
25
26 // WriteTypeSymbolic - This attempts to write the specified type as a symbolic
27 // type, iff there is an entry in the modules symbol table for the specified
28 // type or one of it's component types.  This is slower than a simple x << Type;
29 //
30 std::ostream &WriteTypeSymbolic(std::ostream &, const Type *, const Module *M);
31
32
33 // WriteAsOperand - Write the name of the specified value out to the specified
34 // ostream.  This can be useful when you just want to print int %reg126, not the
35 // whole instruction that generated it.
36 //
37 std::ostream &WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true,
38                              bool PrintName = true, SlotCalculator *Table = 0);
39
40 #endif