Fix typo in method name Struct::AddMemberName

Also add a method comment for it.
This commit is contained in:
David Neto 2017-04-01 11:19:40 -04:00
parent ceb1d4f2fd
commit 58e7a3e607
3 changed files with 6 additions and 4 deletions

View File

@ -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");
}

View File

@ -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;

View File

@ -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;