[PATCH] D28828: [DWARF] [ObjectYAML] Adding APIs for unittesting

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 14:11:38 PST 2017


beanz added inline comments.


================
Comment at: unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:1163-1177
+  const char *yamldata = "debug_abbrev:\n"
+                         "  - Code:            0x00000001\n"
+                         "    Tag:             DW_TAG_compile_unit\n"
+                         "    Children:        DW_CHILDREN_yes\n"
+                         "    Attributes:\n"
+                         "debug_info:\n"
+                         "  - Length:          9\n"
----------------
dblaikie wrote:
> Are raw string literals an option here/yet? (are they compatible with all LLVM's supported compilers)
I looked at this. Using multi-line raw syntax is, IMO, undesirable for encoded yaml because yaml is whitespace-sensitive. Using the non-raw syntax the strings in the code can be formatted with clang-format and still look like well-formed yaml. With the raw syntax the indentation gets screwy.


https://reviews.llvm.org/D28828





More information about the llvm-commits mailing list