This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Refactor character printing in DumpDataExtractor
ClosedPublic

Authored by teemperor on Jul 13 2020, 2:57 AM.

Details

Summary

Just unifying all that copy-pasted code.

Diff Detail

Event Timeline

teemperor created this revision.Jul 13 2020, 2:57 AM
JDevlieghere accepted this revision.Jul 13 2020, 8:39 AM

Looks good. I wonder if the escaping of recognized escape sequences should go in LLVM's StringExtras. I have no strong opinion because other than the YAML parser (where this is part of much more complex escaping) I couldn't find a good use case in LLVM after a quick search.

This revision is now accepted and ready to land.Jul 13 2020, 8:39 AM

Well, Clang is also doing string escaping from what I can see, but it's very specific to the way C/C++ is escaping strings, so it doesn't seem logical to move that to LLVM (and adding a Clang dependency on Core also doesn't seem like a great idea). I'll leave that open for follow-up PRs :)

Well, Clang is also doing string escaping from what I can see, but it's very specific to the way C/C++ is escaping strings, so it doesn't seem logical to move that to LLVM (and adding a Clang dependency on Core also doesn't seem like a great idea). I'll leave that open for follow-up PRs :)

Sounds good to me

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2020, 5:22 AM