[PATCH] D69558: [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex*) as LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 09:30:16 PDT 2019


MaskRay resigned from this revision.
MaskRay added a comment.

It seems the problem in `ObjectYAML/MachO/bogus_load_command.yaml` was introduced before this patch, and Mach-O developers have been notified. LG

BTW, have you tested lldb? It recently gets some YAML tests.



================
Comment at: llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml:441
 #CHECK:             - Value:           0x000000000000000A
-#CHECK:               BlockData:       
-#CHECK:                 - 0x01
-#CHECK:                 - 0x02
-#CHECK:                 - 0x03
-#CHECK:                 - 0x04
-#CHECK:                 - 0x05
-#CHECK:                 - 0x06
-#CHECK:                 - 0x07
-#CHECK:                 - 0x08
-#CHECK:                 - 0x09
-#CHECK:                 - 0x00
+#CHECK:               BlockData:       [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+#CHECK:                                  0x08, 0x09, 0x00 ]
----------------
Just a thought: there are 7 elements on one line. 8 may look slightly better if we can make the column limit softer..

The default WrapColumn used in llvm::yaml::Output::Output is 70. YAMLTraits tries to wrap the line when the column number exceeds 70.

  lang=cpp
  bool Output::preflightFlowElement(unsigned, void *&) {
    if (NeedFlowSequenceComma)
      output(", ");
    if (WrapColumn && Column > WrapColumn) {
      output("\n");
      for (int i = 0; i < ColumnAtFlowStart; ++i)
        output(" ");
      Column = ColumnAtFlowStart;
      output("  ");
    }
    return true;
  }



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69558/new/

https://reviews.llvm.org/D69558





More information about the llvm-commits mailing list