mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-12 17:37:13 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1248 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
964 B
C++
36 lines
964 B
C++
//===- llvm/Transforms/SwapStructContents.h - Permute Structs ----*- C++ -*--=//
|
|
//
|
|
// This pass does a simple transformation that swaps all of the elements of the
|
|
// struct types in the program around.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
|
|
#define LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
class SwapStructContents : public Pass {
|
|
Pass *StructMutator;
|
|
public:
|
|
// doPassInitialization - Figure out what transformation to do
|
|
//
|
|
bool doPassInitialization(Module *M);
|
|
|
|
// doPerMethodWork - Virtual method overriden by subclasses to do the
|
|
// per-method processing of the pass.
|
|
//
|
|
virtual bool doPerMethodWork(Method *M) {
|
|
return StructMutator->doPerMethodWork(M);
|
|
}
|
|
|
|
// doPassFinalization - Forward to our worker.
|
|
//
|
|
virtual bool doPassFinalization(Module *M) {
|
|
return StructMutator->doPassFinalization(M);
|
|
}
|
|
|
|
};
|
|
|
|
#endif
|