blob: d4e2edd5ddd34f49884d9ffe8881bfe90cd0dba8 (
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
|
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=//
//
// Support for inserting LLVM code to print values at basic block and method
// exits.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
#define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
#include "llvm/Pass.h"
class InsertTraceCode : public Pass {
bool TraceBasicBlockExits, TraceMethodExits;
public:
InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits)
: TraceBasicBlockExits(traceBasicBlockExits),
TraceMethodExits(traceMethodExits) {}
//--------------------------------------------------------------------------
// Function InsertCodeToTraceValues
//
// Inserts tracing code for all live values at basic block and/or method exits
// as specified by `traceBasicBlockExits' and `traceMethodExits'.
//
static bool doInsertTraceCode(Method *M, bool traceBasicBlockExits,
bool traceMethodExits);
// doPerMethodWork - This method does the work. Always successful.
//
bool doPerMethodWork(Method *M) {
return doInsertTraceCode(M, TraceBasicBlockExits, TraceMethodExits);
}
};
#endif /*LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H*/
|