summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-26 16:49:49 +0000
committerChris Lattner <sabre@nondot.org>2001-11-26 16:49:49 +0000
commit0252755825f49dc5c2083dbf246968767f2aad14 (patch)
tree8e1b04dceba0d09ccc44256c43389406c0ba93b9 /include
parentd43d9007a3cb93ff0e4b7ff72a14dd4fa5007ed3 (diff)
downloadllvm-0252755825f49dc5c2083dbf246968767f2aad14.tar.gz
llvm-0252755825f49dc5c2083dbf246968767f2aad14.tar.bz2
llvm-0252755825f49dc5c2083dbf246968767f2aad14.tar.xz
Rearrange code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/IPO/SimpleStructMutation.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/include/llvm/Transforms/IPO/SimpleStructMutation.h b/include/llvm/Transforms/IPO/SimpleStructMutation.h
index 62da4185da..77b962b107 100644
--- a/include/llvm/Transforms/IPO/SimpleStructMutation.h
+++ b/include/llvm/Transforms/IPO/SimpleStructMutation.h
@@ -8,28 +8,18 @@
#ifndef LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
#define LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
-#include "llvm/Pass.h"
+#include "llvm/Transforms/MutateStructTypes.h"
-class SwapStructContents : public Pass {
- Pass *StructMutator;
+// FIXME: Move to correct location!
+class PrebuiltStructMutation : public MutateStructTypes {
public:
- // doPassInitialization - Figure out what transformation to do
- //
- bool doPassInitialization(Module *M);
+ enum Transform { SwapElements, SortElements };
- // 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);
- }
+ PrebuiltStructMutation(Module *M, enum Transform XForm)
+ : MutateStructTypes(getTransforms(M, XForm)) {}
+private:
+ static TransformsType getTransforms(Module *M, enum Transform);
};
#endif