Lines Matching defs:Structure
165 StructInfo Structure;
186 struct StructInfo Structure);
220 Structure = S;
281 std::vector<StructInitializer> &&Initializers, struct StructInfo Structure)
283 new (&StructInfo) StructFieldInfo(std::move(Initializers), Structure);
626 bool lookUpField(const StructInfo &Structure, StringRef Member,
895 bool parseStructInitializer(const StructInfo &Structure,
898 const StructInfo &Structure, std::vector<StructInitializer> &Initializers,
918 bool emitStructInitializer(const StructInfo &Structure,
922 bool emitStructValues(const StructInfo &Structure, unsigned *Count = nullptr);
923 bool addStructField(StringRef Name, const StructInfo &Structure);
924 bool parseDirectiveStructValue(const StructInfo &Structure,
926 bool parseDirectiveNamedStructValue(const StructInfo &Structure,
2504 return parseDirectiveStructValue(/*Structure=*/IDIt->getValue(), IDVal,
2638 return parseDirectiveNamedStructValue(/*Structure=*/NextIt->getValue(),
4131 if (parseStructInstList(Contents.Structure, Initializers,
4136 if (parseStructInstList(Contents.Structure, Initializers,
4145 if (parseStructInitializer(Contents.Structure, Initializers.back()))
4159 Initializer = FieldInitializer(std::move(Initializers), Contents.Structure);
4176 bool MasmParser::parseStructInitializer(const StructInfo &Structure,
4199 while (getTok().isNot(*EndToken) && FieldIndex < Structure.Fields.size()) {
4200 const FieldInfo &Field = Structure.Fields[FieldIndex++];
4216 if (FieldIndex == Structure.Fields.size())
4217 return Error(CommaLoc, "'" + Structure.Name +
4223 for (const FieldInfo &Field : llvm::drop_begin(Structure.Fields, FieldIndex))
4237 const StructInfo &Structure, std::vector<StructInitializer> &Initializers,
4260 parseStructInstList(Structure, DuplicatedValues) || parseRParen())
4267 if (parseStructInitializer(Structure, Initializers.back()))
4303 for (const auto &SubField : Contents.Structure.Fields) {
4360 if (emitStructInitializer(Contents.Structure, Init))
4366 if (emitStructInitializer(Contents.Structure, Init))
4388 bool MasmParser::emitStructInitializer(const StructInfo &Structure,
4390 if (!Structure.Initializable)
4392 "cannot initialize a value of type '" + Structure.Name +
4396 const auto &Field = Structure.Fields[Index++];
4404 Structure.Fields, Initializer.FieldInitializers.size())) {
4411 if (Offset != Structure.Size)
4412 getStreamer().emitZeros(Structure.Size - Offset);
4417 bool MasmParser::emitStructValues(const StructInfo &Structure,
4420 if (parseStructInstList(Structure, Initializers))
4424 if (emitStructInitializer(Structure, Initializer))
4434 bool MasmParser::addStructField(StringRef Name, const StructInfo &Structure) {
4437 OwningStruct.addField(Name, FT_STRUCT, Structure.AlignmentSize);
4440 StructInfo.Structure = Structure;
4441 Field.Type = Structure.Size;
4443 if (parseStructInstList(Structure, StructInfo.Initializers))
4461 bool MasmParser::parseDirectiveStructValue(const StructInfo &Structure,
4464 if (emitStructValues(Structure))
4466 } else if (addStructField("", Structure)) {
4475 bool MasmParser::parseDirectiveNamedStructValue(const StructInfo &Structure,
4483 if (emitStructValues(Structure, &Count))
4486 Type.Name = Structure.Name;
4487 Type.Size = Structure.Size * Count;
4488 Type.ElementSize = Structure.Size;
4491 } else if (addStructField(Name, Structure)) {
4575 StructInfo Structure = StructInProgress.pop_back_val();
4578 Structure.Size = llvm::alignTo(
4579 Structure.Size, std::min(Structure.Alignment, Structure.AlignmentSize));
4580 Structs[Name.lower()] = Structure;
4597 StructInfo Structure = StructInProgress.pop_back_val();
4599 Structure.Size = llvm::alignTo(Structure.Size, Structure.Alignment);
4602 if (Structure.Name.empty()) {
4608 std::make_move_iterator(Structure.Fields.begin()),
4609 std::make_move_iterator(Structure.Fields.end()));
4610 for (const auto &FieldByName : Structure.FieldsByName) {
4616 if (!Structure.Fields.empty() && !ParentStruct.IsUnion) {
4619 std::min(ParentStruct.Alignment, Structure.AlignmentSize));
4623 ParentStruct.Size = std::max(ParentStruct.Size, Structure.Size);
4628 const unsigned StructureEnd = FirstFieldOffset + Structure.Size;
4635 FieldInfo &Field = ParentStruct.addField(Structure.Name, FT_STRUCT,
4636 Structure.AlignmentSize);
4638 Field.Type = Structure.Size;
4640 Field.SizeOf = Structure.Size;
4648 StructInfo.Structure = Structure;
4651 for (const auto &SubField : Structure.Fields) {
4677 StructInfo &Structure = StructInProgress.back();
4687 Structure.NextOffset = static_cast<unsigned>(OffsetRes);
4690 Structure.Initializable = false;
4718 StructInfo &Structure = StructInProgress.back();
4719 Structure.NextOffset = llvm::alignTo(Structure.NextOffset, Alignment);
7263 bool MasmParser::lookUpField(const StructInfo &Structure, StringRef Member,
7266 Info.Type.Name = Structure.Name;
7267 Info.Type.Size = Structure.Size;
7268 Info.Type.ElementSize = Structure.Size;
7280 auto FieldIt = Structure.FieldsByName.find(FieldName.lower());
7281 if (FieldIt == Structure.FieldsByName.end())
7284 const FieldInfo &Field = Structure.Fields[FieldIt->second];
7291 Info.Type.Name = Field.Contents.StructInfo.Structure.Name;
7301 if (lookUpField(StructInfo.Structure, FieldMember, Info))
7329 const StructInfo &Structure = StructIt->second;
7331 Info.ElementSize = Structure.Size;
7333 Info.Size = Structure.Size;