Files
Patrice Blin 835c5bcbda compatibility: fix headers ordering for llvm 12
In CryptoUtils.h some macro name ("S") conflict with templates in llvm
headers. Putting aside the name of this macro, including internal
headers before llvm's would only cause use troubles.
2022-03-17 18:31:37 +01:00

49 lines
1.4 KiB
C++

//===- FlatteningIncludes.h - Flattening Obfuscation pass------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains includes and defines for the split basicblock pass
//
//===----------------------------------------------------------------------===//
#ifndef _SPLIT_INCLUDES_
#define _SPLIT_INCLUDES_
// LLVM include
#include "utils/Utils.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Local.h" // For DemoteRegToStack and DemotePHIToStack
// Namespace
namespace llvm {
struct SplitBasicBlock {
bool flag;
SplitBasicBlock() {}
bool runSplitBasicBlock(Function &F);
void split(Function *f);
bool containsPHI(BasicBlock *b);
void shuffle(std::vector<int> &vec);
};
struct SplitBasicBlockPass : public PassInfoMixin<SplitBasicBlockPass>,
public SplitBasicBlock {
SplitBasicBlockPass();
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
} // namespace llvm
#endif