<commit_before>//===- 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<commit_msg>Rearrange code<commit_after>//===- 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
{'fraction_non_alphanumeric': 0.1857222532069158, 'fraction_numerical': 0.0, 'mean_word_length': 2.841541755888651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4147168', 'n_tokens_mistral': 529, 'n_tokens_neox': 524, 'n_words': 140}