llvm-6502/include/llvm/Transforms/IPO/SimpleStructMutation.h
Chris Lattner 0252755825 Rearrange code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1334 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:49:49 +00:00

26 lines
776 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/Transforms/MutateStructTypes.h"
// FIXME: Move to correct location!
class PrebuiltStructMutation : public MutateStructTypes {
public:
enum Transform { SwapElements, SortElements };
PrebuiltStructMutation(Module *M, enum Transform XForm)
: MutateStructTypes(getTransforms(M, XForm)) {}
private:
static TransformsType getTransforms(Module *M, enum Transform);
};
#endif