mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1334 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
776 B
C++
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
|