aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Transforms/Instrumentation/TraceValues.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/include/llvm/Transforms/Instrumentation/TraceValues.h b/include/llvm/Transforms/Instrumentation/TraceValues.h
index af21209f10..8f4ee1d981 100644
--- a/include/llvm/Transforms/Instrumentation/TraceValues.h
+++ b/include/llvm/Transforms/Instrumentation/TraceValues.h
@@ -15,9 +15,8 @@
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
#define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
-class Module;
-class Method;
-class BasicBlock;
+#include "llvm/Transforms/Pass.h"
+
class Instruction;
class Value;
class Type;
@@ -70,6 +69,20 @@ void InsertCodeToTraceValues (Method* method,
bool traceBasicBlockExits,
bool traceMethodExits);
-//**************************************************************************/
-#endif LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
+class InsertTraceCode : public ConcretePass<InsertTraceCode> {
+ bool TraceBasicBlockExits, TraceMethodExits;
+public:
+ InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits)
+ : TraceBasicBlockExits(traceBasicBlockExits),
+ TraceMethodExits(traceMethodExits) {}
+
+ // doPerMethodWork - This method does the work. Always successful.
+ //
+ bool doPerMethodWorkVirt(Method *M) {
+ InsertCodeToTraceValues(M, TraceBasicBlockExits, TraceMethodExits);
+ return false;
+ }
+};
+
+#endif /*LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H*/