aboutsummaryrefslogtreecommitdiff
path: root/source/fuzz/transformation_add_parameter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fuzz/transformation_add_parameter.cpp')
-rw-r--r--source/fuzz/transformation_add_parameter.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/fuzz/transformation_add_parameter.cpp b/source/fuzz/transformation_add_parameter.cpp
index 8bd2ed78..48de3e83 100644
--- a/source/fuzz/transformation_add_parameter.cpp
+++ b/source/fuzz/transformation_add_parameter.cpp
@@ -112,7 +112,7 @@ void TransformationAddParameter::Apply(
// Add new parameters to the function.
function->AddParameter(MakeUnique<opt::Instruction>(
- ir_context, spv::Op::OpFunctionParameter, new_parameter_type_id,
+ ir_context, SpvOpFunctionParameter, new_parameter_type_id,
message_.parameter_fresh_id(), opt::Instruction::OperandList()));
fuzzerutil::UpdateModuleIdBound(ir_context, message_.parameter_fresh_id());
@@ -178,16 +178,16 @@ bool TransformationAddParameter::IsParameterTypeSupported(
// Think about other type instructions we can add here.
opt::Instruction* type_inst = ir_context->get_def_use_mgr()->GetDef(type_id);
switch (type_inst->opcode()) {
- case spv::Op::OpTypeBool:
- case spv::Op::OpTypeInt:
- case spv::Op::OpTypeFloat:
- case spv::Op::OpTypeMatrix:
- case spv::Op::OpTypeVector:
+ case SpvOpTypeBool:
+ case SpvOpTypeInt:
+ case SpvOpTypeFloat:
+ case SpvOpTypeMatrix:
+ case SpvOpTypeVector:
return true;
- case spv::Op::OpTypeArray:
+ case SpvOpTypeArray:
return IsParameterTypeSupported(ir_context,
type_inst->GetSingleWordInOperand(0));
- case spv::Op::OpTypeStruct:
+ case SpvOpTypeStruct:
if (fuzzerutil::HasBlockOrBufferBlockDecoration(ir_context, type_id)) {
return false;
}
@@ -198,13 +198,13 @@ bool TransformationAddParameter::IsParameterTypeSupported(
}
}
return true;
- case spv::Op::OpTypePointer: {
- spv::StorageClass storage_class =
- static_cast<spv::StorageClass>(type_inst->GetSingleWordInOperand(0));
+ case SpvOpTypePointer: {
+ SpvStorageClass storage_class =
+ static_cast<SpvStorageClass>(type_inst->GetSingleWordInOperand(0));
switch (storage_class) {
- case spv::StorageClass::Private:
- case spv::StorageClass::Function:
- case spv::StorageClass::Workgroup: {
+ case SpvStorageClassPrivate:
+ case SpvStorageClassFunction:
+ case SpvStorageClassWorkgroup: {
return IsParameterTypeSupported(ir_context,
type_inst->GetSingleWordInOperand(1));
}