Lines Matching refs:Structure

170   StructInfo Structure;  member
175 Structure = S; in StructFieldInfo()
179 Structure = S; in StructFieldInfo()
229 struct StructInfo Structure) in FieldInitializer() argument
231 new (&StructInfo) StructFieldInfo(Initializers, Structure); in FieldInitializer()
609 bool lookUpField(const StructInfo &Structure, StringRef Member,
878 bool parseStructInitializer(const StructInfo &Structure,
881 const StructInfo &Structure, std::vector<StructInitializer> &Initializers,
901 bool emitStructInitializer(const StructInfo &Structure,
905 bool emitStructValues(const StructInfo &Structure, unsigned *Count = nullptr);
906 bool addStructField(StringRef Name, const StructInfo &Structure);
907 bool parseDirectiveStructValue(const StructInfo &Structure,
909 bool parseDirectiveNamedStructValue(const StructInfo &Structure,
4148 if (parseStructInstList(Contents.Structure, Initializers, in parseFieldInitializer()
4153 if (parseStructInstList(Contents.Structure, Initializers, in parseFieldInitializer()
4162 if (parseStructInitializer(Contents.Structure, Initializers.back())) in parseFieldInitializer()
4176 Initializer = FieldInitializer(std::move(Initializers), Contents.Structure); in parseFieldInitializer()
4193 bool MasmParser::parseStructInitializer(const StructInfo &Structure, in parseStructInitializer() argument
4217 FieldIndex < Structure.Fields.size()) { in parseStructInitializer()
4218 const FieldInfo &Field = Structure.Fields[FieldIndex++]; in parseStructInitializer()
4234 if (FieldIndex == Structure.Fields.size()) in parseStructInitializer()
4235 return Error(CommaLoc, "'" + Structure.Name + in parseStructInitializer()
4241 for (const FieldInfo &Field : llvm::drop_begin(Structure.Fields, FieldIndex)) in parseStructInitializer()
4255 const StructInfo &Structure, std::vector<StructInitializer> &Initializers, in parseStructInstList() argument
4278 parseStructInstList(Structure, DuplicatedValues) || parseRParen()) in parseStructInstList()
4285 if (parseStructInitializer(Structure, Initializers.back())) in parseStructInstList()
4321 for (const auto &SubField : Contents.Structure.Fields) { in emitFieldValue()
4378 if (emitStructInitializer(Contents.Structure, Init)) in emitFieldInitializer()
4384 if (emitStructInitializer(Contents.Structure, Init)) in emitFieldInitializer()
4406 bool MasmParser::emitStructInitializer(const StructInfo &Structure, in emitStructInitializer() argument
4408 if (!Structure.Initializable) in emitStructInitializer()
4410 "cannot initialize a value of type '" + Structure.Name + in emitStructInitializer()
4414 const auto &Field = Structure.Fields[Index++]; in emitStructInitializer()
4422 Structure.Fields, Initializer.FieldInitializers.size())) { in emitStructInitializer()
4429 if (Offset != Structure.Size) in emitStructInitializer()
4430 getStreamer().emitZeros(Structure.Size - Offset); in emitStructInitializer()
4435 bool MasmParser::emitStructValues(const StructInfo &Structure, in emitStructValues() argument
4438 if (parseStructInstList(Structure, Initializers)) in emitStructValues()
4442 if (emitStructInitializer(Structure, Initializer)) in emitStructValues()
4452 bool MasmParser::addStructField(StringRef Name, const StructInfo &Structure) { in addStructField() argument
4455 OwningStruct.addField(Name, FT_STRUCT, Structure.AlignmentSize); in addStructField()
4458 StructInfo.Structure = Structure; in addStructField()
4459 Field.Type = Structure.Size; in addStructField()
4461 if (parseStructInstList(Structure, StructInfo.Initializers)) in addStructField()
4479 bool MasmParser::parseDirectiveStructValue(const StructInfo &Structure, in parseDirectiveStructValue() argument
4482 if (emitStructValues(Structure)) in parseDirectiveStructValue()
4484 } else if (addStructField("", Structure)) { in parseDirectiveStructValue()
4493 bool MasmParser::parseDirectiveNamedStructValue(const StructInfo &Structure, in parseDirectiveNamedStructValue() argument
4501 if (emitStructValues(Structure, &Count)) in parseDirectiveNamedStructValue()
4504 Type.Name = Structure.Name; in parseDirectiveNamedStructValue()
4505 Type.Size = Structure.Size * Count; in parseDirectiveNamedStructValue()
4506 Type.ElementSize = Structure.Size; in parseDirectiveNamedStructValue()
4509 } else if (addStructField(Name, Structure)) { in parseDirectiveNamedStructValue()
4593 StructInfo Structure = StructInProgress.pop_back_val(); in parseDirectiveEnds() local
4596 Structure.Size = llvm::alignTo( in parseDirectiveEnds()
4597 Structure.Size, std::min(Structure.Alignment, Structure.AlignmentSize)); in parseDirectiveEnds()
4598 Structs[Name.lower()] = Structure; in parseDirectiveEnds()
4615 StructInfo Structure = StructInProgress.pop_back_val(); in parseDirectiveNestedEnds() local
4617 Structure.Size = llvm::alignTo(Structure.Size, Structure.Alignment); in parseDirectiveNestedEnds()
4620 if (Structure.Name.empty()) { in parseDirectiveNestedEnds()
4626 std::make_move_iterator(Structure.Fields.begin()), in parseDirectiveNestedEnds()
4627 std::make_move_iterator(Structure.Fields.end())); in parseDirectiveNestedEnds()
4628 for (const auto &FieldByName : Structure.FieldsByName) { in parseDirectiveNestedEnds()
4634 if (!Structure.Fields.empty() && !ParentStruct.IsUnion) { in parseDirectiveNestedEnds()
4637 std::min(ParentStruct.Alignment, Structure.AlignmentSize)); in parseDirectiveNestedEnds()
4641 ParentStruct.Size = std::max(ParentStruct.Size, Structure.Size); in parseDirectiveNestedEnds()
4646 const unsigned StructureEnd = FirstFieldOffset + Structure.Size; in parseDirectiveNestedEnds()
4653 FieldInfo &Field = ParentStruct.addField(Structure.Name, FT_STRUCT, in parseDirectiveNestedEnds()
4654 Structure.AlignmentSize); in parseDirectiveNestedEnds()
4656 Field.Type = Structure.Size; in parseDirectiveNestedEnds()
4658 Field.SizeOf = Structure.Size; in parseDirectiveNestedEnds()
4666 StructInfo.Structure = Structure; in parseDirectiveNestedEnds()
4669 for (const auto &SubField : Structure.Fields) { in parseDirectiveNestedEnds()
4695 StructInfo &Structure = StructInProgress.back(); in parseDirectiveOrg() local
4705 Structure.NextOffset = static_cast<unsigned>(OffsetRes); in parseDirectiveOrg()
4708 Structure.Initializable = false; in parseDirectiveOrg()
4735 StructInfo &Structure = StructInProgress.back(); in emitAlignTo() local
4736 Structure.NextOffset = llvm::alignTo(Structure.NextOffset, Alignment); in emitAlignTo()
7277 bool MasmParser::lookUpField(const StructInfo &Structure, StringRef Member, in lookUpField() argument
7280 Info.Type.Name = Structure.Name; in lookUpField()
7281 Info.Type.Size = Structure.Size; in lookUpField()
7282 Info.Type.ElementSize = Structure.Size; in lookUpField()
7294 auto FieldIt = Structure.FieldsByName.find(FieldName.lower()); in lookUpField()
7295 if (FieldIt == Structure.FieldsByName.end()) in lookUpField()
7298 const FieldInfo &Field = Structure.Fields[FieldIt->second]; in lookUpField()
7305 Info.Type.Name = Field.Contents.StructInfo.Structure.Name; in lookUpField()
7315 if (lookUpField(StructInfo.Structure, FieldMember, Info)) in lookUpField()
7343 const StructInfo &Structure = StructIt->second; in lookUpType() local
7345 Info.ElementSize = Structure.Size; in lookUpType()
7347 Info.Size = Structure.Size; in lookUpType()