aboutsummaryrefslogtreecommitdiff
path: root/instrumentation/split-switches-pass.so.cc
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-07-12 09:04:54 +0200
committervanhauser-thc <vh@thc.org>2022-07-12 09:04:54 +0200
commitb847e0f414e7b310e1a68bc501d4e2453bfce70e (patch)
tree1ea5ebbb0b47e8d55b1950e9b787ec9f254655af /instrumentation/split-switches-pass.so.cc
parent338f1ae2f85dffe7daa88fa78cd1d078a986d0d5 (diff)
downloadafl++-b847e0f414e7b310e1a68bc501d4e2453bfce70e.tar.gz
clang format 14
Diffstat (limited to 'instrumentation/split-switches-pass.so.cc')
-rw-r--r--instrumentation/split-switches-pass.so.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/instrumentation/split-switches-pass.so.cc b/instrumentation/split-switches-pass.so.cc
index 96e01a8b..79ba12d2 100644
--- a/instrumentation/split-switches-pass.so.cc
+++ b/instrumentation/split-switches-pass.so.cc
@@ -102,7 +102,7 @@ class SplitSwitchesTransform : public ModulePass {
struct CaseExpr {
ConstantInt *Val;
- BasicBlock * BB;
+ BasicBlock *BB;
CaseExpr(ConstantInt *val = nullptr, BasicBlock *bb = nullptr)
: Val(val), BB(bb) {
@@ -182,7 +182,7 @@ BasicBlock *SplitSwitchesTransform::switchConvert(
unsigned ValTypeBitWidth = Cases[0].Val->getBitWidth();
IntegerType *ValType =
IntegerType::get(OrigBlock->getContext(), ValTypeBitWidth);
- IntegerType * ByteType = IntegerType::get(OrigBlock->getContext(), 8);
+ IntegerType *ByteType = IntegerType::get(OrigBlock->getContext(), 8);
unsigned BytesInValue = bytesChecked.size();
std::vector<uint8_t> setSizes;
std::vector<std::set<uint8_t> > byteSets(BytesInValue, std::set<uint8_t>());
@@ -221,8 +221,8 @@ BasicBlock *SplitSwitchesTransform::switchConvert(
/* there are only smallestSize different bytes at index smallestIndex */
Instruction *Shift, *Trunc;
- Function * F = OrigBlock->getParent();
- BasicBlock * NewNode = BasicBlock::Create(Val->getContext(), "NodeBlock", F);
+ Function *F = OrigBlock->getParent();
+ BasicBlock *NewNode = BasicBlock::Create(Val->getContext(), "NodeBlock", F);
Shift = BinaryOperator::Create(Instruction::LShr, Val,
ConstantInt::get(ValType, smallestIndex * 8));
NewNode->getInstList().push_back(Shift);
@@ -403,9 +403,9 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) {
BasicBlock *CurBlock = SI->getParent();
BasicBlock *OrigBlock = CurBlock;
- Function * F = CurBlock->getParent();
+ Function *F = CurBlock->getParent();
/* this is the value we are switching on */
- Value * Val = SI->getCondition();
+ Value *Val = SI->getCondition();
BasicBlock *Default = SI->getDefaultDest();
unsigned bitw = Val->getType()->getIntegerBitWidth();
@@ -445,7 +445,7 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) {
* round up bytesChecked (in case getBitWidth() % 8 != 0) */
std::vector<bool> bytesChecked((7 + Cases[0].Val->getBitWidth()) / 8,
false);
- BasicBlock * SwitchBlock =
+ BasicBlock *SwitchBlock =
switchConvert(Cases, bytesChecked, OrigBlock, NewDefault, Val, 0);
/* Branch to our shiny new if-then stuff... */
@@ -483,7 +483,7 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) {
}
#if LLVM_VERSION_MAJOR >= 11 /* use new pass manager */
-PreservedAnalyses SplitSwitchesTransform::run(Module & M,
+PreservedAnalyses SplitSwitchesTransform::run(Module &M,
ModuleAnalysisManager &MAM) {
#else