aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp b/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
index 7443d49967c5..46ebbef4d9d2 100644
--- a/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
+++ b/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
@@ -163,7 +163,7 @@ OpDescriptor llvm::fuzzerop::splitBlockDescriptor(unsigned Weight) {
SourcePred isInt1Ty{[](ArrayRef<Value *>, const Value *V) {
return V->getType()->isIntegerTy(1);
},
- None};
+ std::nullopt};
return {Weight, {isInt1Ty}, buildSplitBlock};
}
@@ -174,7 +174,7 @@ OpDescriptor llvm::fuzzerop::gepDescriptor(unsigned Weight) {
Type *Ty = Srcs[0]->getType()->isOpaquePointerTy()
? Srcs[1]->getType()
: Srcs[0]->getType()->getNonOpaquePointerElementType();
- auto Indices = makeArrayRef(Srcs).drop_front(2);
+ auto Indices = ArrayRef(Srcs).drop_front(2);
return GetElementPtrInst::Create(Ty, Srcs[0], Indices, "G", Inst);
};
// TODO: Handle aggregates and vectors
@@ -182,7 +182,7 @@ OpDescriptor llvm::fuzzerop::gepDescriptor(unsigned Weight) {
// TODO: Try to avoid meaningless accesses.
SourcePred sizedType(
[](ArrayRef<Value *>, const Value *V) { return V->getType()->isSized(); },
- None);
+ std::nullopt);
return {Weight, {sizedPtrType(), sizedType, anyIntType()}, buildGEP};
}
@@ -298,7 +298,7 @@ OpDescriptor llvm::fuzzerop::insertElementDescriptor(unsigned Weight) {
auto buildInsert = [](ArrayRef<Value *> Srcs, Instruction *Inst) {
return InsertElementInst::Create(Srcs[0], Srcs[1], Srcs[2], "I", Inst);
};
- // TODO: Try to avoid undefined accesses.
+ // TODO: Try to avoid undefined accesses.
return {Weight,
{anyVectorType(), matchScalarOfFirstType(), anyIntType()},
buildInsert};
@@ -313,8 +313,8 @@ static SourcePred validShuffleVectorIndex() {
auto *Int32Ty = Type::getInt32Ty(Cur[0]->getContext());
// TODO: It's straighforward to make up reasonable values, but listing them
// exhaustively would be insane. Come up with a couple of sensible ones.
- return std::vector<Constant *>{UndefValue::get(
- VectorType::get(Int32Ty, FirstTy->getElementCount()))};
+ return std::vector<Constant *>{
+ UndefValue::get(VectorType::get(Int32Ty, FirstTy->getElementCount()))};
};
return {Pred, Make};
}