1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/tools/llvm-xray
Alex Cameron 5afbf35b3f [XRay] Sanitize DOT labels in graph output
Summary:
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=39701

This patch is to convert certain characters to their XML escape sequences when generating labels for a DOT graph.

I had trouble reproducing the exact issue described on the tracker. I ran `llvm-xray graph` on a log from a test program that included function templates but wasn't able to get the `dot` tool to complain about the `<` and `>` characters. The documentation also suggests that the escape sequences should only be necessary when using HTML string labels which XRay doesn't use (`label=<...>` as opposed to `label="..."`). Perhaps newer versions of Graphviz silently handle this in the case of quoted-string labels.

In any case, the generated labels still look correct after this patch and should also fix the reporter's issue.

I was a bit unsure how to add a test for this since the existing tests seem to only care about `func-id` rather than giving an actual name. If you could give me a hint on the best way to go about this, that'd be much appreciated!

Reviewers: dberris

Reviewed By: dberris

Subscribers: lebedev.ri, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69461
2020-03-09 12:05:57 +00:00
..
CMakeLists.txt Break false dependencies on target libraries 2019-05-23 23:02:56 +00:00
func-id-helper.cpp [llvm-objdump] Add warning messages if disassembly + source for problematic inputs 2019-08-15 05:15:22 +00:00
func-id-helper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-xray.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
trie-node.h Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
xray-account.cpp [xray] Remove cl::sub from alias options 2020-01-09 22:05:14 -08:00
xray-account.h [xray] Remove usage of procid_t 2019-06-26 15:42:42 +00:00
xray-color-helper.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
xray-color-helper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xray-converter.cpp [xray] Remove cl::sub from alias options 2020-01-09 22:05:14 -08:00
xray-converter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xray-extract.cpp [xray] add --no-demangle cli opt for llvm-xray extract to output mangled names 2020-01-16 16:37:00 -08:00
xray-fdr-dump.cpp Switch LLVM to use 64-bit offsets (2/5) 2019-08-06 10:49:40 +00:00
xray-graph-diff.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
xray-graph-diff.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xray-graph.cpp [XRay] Sanitize DOT labels in graph output 2020-03-09 12:05:57 +00:00
xray-graph.h [xray] Remove usage of procid_t 2019-06-26 15:42:42 +00:00
xray-registry.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xray-registry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xray-stacks.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00