mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Convert to use Pass infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -15,9 +15,8 @@
|
|||||||
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
|
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
|
||||||
#define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
|
#define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
|
||||||
|
|
||||||
class Module;
|
#include "llvm/Transforms/Pass.h"
|
||||||
class Method;
|
|
||||||
class BasicBlock;
|
|
||||||
class Instruction;
|
class Instruction;
|
||||||
class Value;
|
class Value;
|
||||||
class Type;
|
class Type;
|
||||||
@ -70,6 +69,20 @@ void InsertCodeToTraceValues (Method* method,
|
|||||||
bool traceBasicBlockExits,
|
bool traceBasicBlockExits,
|
||||||
bool traceMethodExits);
|
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*/
|
||||||
|
Reference in New Issue
Block a user