mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-12-03 13:12:04 +00:00
Fix typo in method name Struct::AddMemberName
Also add a method comment for it.
This commit is contained in:
parent
ceb1d4f2fd
commit
58e7a3e607
@ -204,7 +204,7 @@ void TypeManager::AttachIfTypeDecoration(const ir::Instruction& inst) {
|
||||
data.push_back(inst.GetSingleWordOperand(i));
|
||||
}
|
||||
if (Struct* st = target_type->AsStruct()) {
|
||||
st->AddMemeberDecoration(index, std::move(data));
|
||||
st->AddMemberDecoration(index, std::move(data));
|
||||
} else {
|
||||
SPIRV_UNIMPLEMENTED(consumer_, "OpMemberDecorate non-struct type");
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ Struct::Struct(const std::vector<Type*>& types) : element_types_(types) {
|
||||
}
|
||||
}
|
||||
|
||||
void Struct::AddMemeberDecoration(uint32_t index,
|
||||
std::vector<uint32_t>&& decoration) {
|
||||
void Struct::AddMemberDecoration(uint32_t index,
|
||||
std::vector<uint32_t>&& decoration) {
|
||||
if (index >= element_types_.size()) {
|
||||
assert(0 && "index out of bound");
|
||||
return;
|
||||
|
@ -262,7 +262,9 @@ class Struct : public Type {
|
||||
Struct(const std::vector<Type*>& element_types);
|
||||
Struct(const Struct&) = default;
|
||||
|
||||
void AddMemeberDecoration(uint32_t index, std::vector<uint32_t>&& decoration);
|
||||
// Adds a decoration to the member at the given index. The first word is the
|
||||
// decoration enum, and the remaining words, if any, are its operands.
|
||||
void AddMemberDecoration(uint32_t index, std::vector<uint32_t>&& decoration);
|
||||
|
||||
bool IsSame(Type* that) const override;
|
||||
std::string str() const override;
|
||||
|
Loading…
Reference in New Issue
Block a user