diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp --- a/llvm/lib/MC/MCParser/MasmParser.cpp +++ b/llvm/lib/MC/MCParser/MasmParser.cpp @@ -794,8 +794,6 @@ bool emitFieldValue(const FieldInfo &Field, const RealFieldInfo &Contents); bool emitFieldValue(const FieldInfo &Field, const StructFieldInfo &Contents); - bool emitStructValue(const StructInfo &Structure); - bool emitFieldInitializer(const FieldInfo &Field, const FieldInitializer &Initializer); bool emitFieldInitializer(const FieldInfo &Field, @@ -812,9 +810,6 @@ const StructInitializer &Initializer); // User-defined types (structs, unions): - bool emitStructValue(const StructInfo &Structure, - const StructInitializer &Initializer, - size_t InitialOffset = 0, size_t InitialField = 0); bool emitStructValues(const StructInfo &Structure); bool addStructField(StringRef Name, const StructInfo &Structure); bool parseDirectiveStructValue(const StructInfo &Structure, @@ -3833,20 +3828,6 @@ llvm_unreachable("Unhandled FieldType enum"); } -bool MasmParser::emitStructValue(const StructInfo &Structure) { - size_t Offset = 0; - for (const auto &Field : Structure.Fields) { - getStreamer().emitZeros(Field.Offset - Offset); - if (emitFieldValue(Field)) - return true; - Offset = Field.Offset + Field.SizeOf; - } - // Add final padding. - if (Offset != Structure.Size) - getStreamer().emitZeros(Structure.Size - Offset); - return false; -} - bool MasmParser::emitFieldInitializer(const FieldInfo &Field, const IntFieldInfo &Contents, const IntFieldInfo &Initializer) {