[PATCH] D53169: Make YAML serializer quote forward slashes

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 14:00:22 PDT 2018


zturner created this revision.
zturner added a reviewer: rnk.
Herald added subscribers: JDevlieghere, eraman.

If you have the string `/usr/bin` our YAML serializer will not quote this, but if you have the string `C:\foo\bar` it will quote it.

While technically not required by the YAML standard, it's nice if we're consistent on quoting them since / and \ both commonly appear in paths.  Otherwise, the same YAML value may be quoted or unquoted depending on what platform a test is run on.  This makes for confusing FileCheck statements.


https://reviews.llvm.org/D53169

Files:
  clang/unittests/Tooling/ReplacementsYamlTest.cpp
  lld/test/mach-o/cstring-sections.yaml
  lld/test/mach-o/parse-data-relocs-x86_64.yaml
  lld/test/mach-o/parse-data.yaml
  lld/test/mach-o/sectcreate.yaml
  llvm/include/llvm/Support/YAMLTraits.h
  llvm/test/ObjectYAML/MachO/DWARF-BigEndian.yaml
  llvm/test/ObjectYAML/MachO/DWARF-LittleEndian.yaml
  llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml
  llvm/test/ObjectYAML/MachO/dylib_dylinker_command.yaml
  llvm/test/Other/size-remarks.ll
  llvm/test/Transforms/GVN/opt-remarks.ll
  llvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
  llvm/test/Transforms/Inline/optimization-remarks-yaml.ll
  llvm/unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53169.169299.patch
Type: text/x-patch
Size: 13436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/ad7ef03f/attachment.bin>


More information about the llvm-commits mailing list