This is an archive of the discontinued LLVM Phabricator instance.

Make YAML serializer quote forward slashes
ClosedPublic

Authored by zturner on Oct 11 2018, 2:00 PM.

Details

Summary

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.

Diff Detail

Event Timeline

zturner created this revision.Oct 11 2018, 2:00 PM
rnk accepted this revision.Oct 11 2018, 3:53 PM

lgtm

Windows paths aside, this is a good change if someone checks out the project inside a directory with spaces, such as "/home/FirstName LastName".

This revision is now accepted and ready to land.Oct 11 2018, 3:53 PM
This revision was automatically updated to reflect the committed changes.