blob: 439141cb44eb8f88b6f9f90178763644c02f7ca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//===- llvm/Support/Dump.h - Easy way to tailor dump output -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file provides the PrefixPrinter interface to pass to MachineFunction
// and MachineBasicBlock print methods to output additional information before
// blocks and instructions are printed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_DUMP_H
#define LLVM_CODEGEN_DUMP_H
#include <iosfwd>
namespace llvm {
class MachineBasicBlock;
class MachineInstr;
class raw_ostream;
/// PrefixPrinter - Print some additional information before printing
/// basic blocks and instructions.
class PrefixPrinter {
public:
virtual ~PrefixPrinter();
/// operator() - Print a prefix before each MachineBasicBlock
virtual raw_ostream &operator()(raw_ostream &out,
const MachineBasicBlock &) const {
return out;
}
/// operator() - Print a prefix before each MachineInstr
virtual raw_ostream &operator()(raw_ostream &out,
const MachineInstr &) const {
return out;
}
/// operator() - Print a prefix before each MachineBasicBlock
virtual std::ostream &operator()(std::ostream &out,
const MachineBasicBlock &) const {
return out;
}
/// operator() - Print a prefix before each MachineInstr
virtual std::ostream &operator()(std::ostream &out,
const MachineInstr &) const {
return out;
}
};
} // End llvm namespace
#endif
|