diff options
Diffstat (limited to 'source/fuzz/transformation_add_global_variable.cpp')
-rw-r--r-- | source/fuzz/transformation_add_global_variable.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/fuzz/transformation_add_global_variable.cpp b/source/fuzz/transformation_add_global_variable.cpp index 6e82d594..814d01b3 100644 --- a/source/fuzz/transformation_add_global_variable.cpp +++ b/source/fuzz/transformation_add_global_variable.cpp @@ -24,11 +24,11 @@ TransformationAddGlobalVariable::TransformationAddGlobalVariable( : message_(std::move(message)) {} TransformationAddGlobalVariable::TransformationAddGlobalVariable( - uint32_t fresh_id, uint32_t type_id, spv::StorageClass storage_class, + uint32_t fresh_id, uint32_t type_id, SpvStorageClass storage_class, uint32_t initializer_id, bool value_is_irrelevant) { message_.set_fresh_id(fresh_id); message_.set_type_id(type_id); - message_.set_storage_class(uint32_t(storage_class)); + message_.set_storage_class(storage_class); message_.set_initializer_id(initializer_id); message_.set_value_is_irrelevant(value_is_irrelevant); } @@ -41,10 +41,10 @@ bool TransformationAddGlobalVariable::IsApplicable( } // The storage class must be Private or Workgroup. - auto storage_class = static_cast<spv::StorageClass>(message_.storage_class()); + auto storage_class = static_cast<SpvStorageClass>(message_.storage_class()); switch (storage_class) { - case spv::StorageClass::Private: - case spv::StorageClass::Workgroup: + case SpvStorageClassPrivate: + case SpvStorageClassWorkgroup: break; default: assert(false && "Unsupported storage class."); @@ -66,7 +66,7 @@ bool TransformationAddGlobalVariable::IsApplicable( } if (message_.initializer_id()) { // An initializer is not allowed if the storage class is Workgroup. - if (storage_class == spv::StorageClass::Workgroup) { + if (storage_class == SpvStorageClassWorkgroup) { assert(false && "By construction this transformation should not have an " "initializer when Workgroup storage class is used."); @@ -95,7 +95,7 @@ void TransformationAddGlobalVariable::Apply( TransformationContext* transformation_context) const { opt::Instruction* new_instruction = fuzzerutil::AddGlobalVariable( ir_context, message_.fresh_id(), message_.type_id(), - static_cast<spv::StorageClass>(message_.storage_class()), + static_cast<SpvStorageClass>(message_.storage_class()), message_.initializer_id()); // Inform the def-use manager about the new instruction. |