[PATCH] D83898: [ms] [llvm-ml] Remove unused function

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 12:02:02 PDT 2020


epastor created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Remove unused function


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83898

Files:
  llvm/lib/MC/MCParser/MasmParser.cpp


Index: llvm/lib/MC/MCParser/MasmParser.cpp
===================================================================
--- llvm/lib/MC/MCParser/MasmParser.cpp
+++ 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83898.278273.patch
Type: text/x-patch
Size: 1821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/d5a36ccb/attachment.bin>


More information about the llvm-commits mailing list