Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
aion
Commits
5f4d8d05
Commit
5f4d8d05
authored
Dec 02, 2018
by
Jonathan Kunstwald
Browse files
Escape windows path backslashes in JSON output
parent
e82f8872
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aion/Tracer.output.cc
View file @
5f4d8d05
...
...
@@ -155,7 +155,9 @@ void write_speedscope_json(std::string const &filename)
out
<<
","
;
out
<<
"{"
;
out
<<
"
\"
name
\"
:
\"
"
<<
(
std
::
string
(
loc
->
name
).
empty
()
?
beautify_function_name
(
loc
->
function
)
:
loc
->
name
)
<<
"
\"
,"
;
out
<<
"
\"
file
\"
:
\"
"
<<
loc
->
file
<<
"
\"
,"
;
std
::
string
escapedFilePath
=
loc
->
file
;
std
::
replace
(
escapedFilePath
.
begin
(),
escapedFilePath
.
end
(),
'\\'
,
'/'
);
out
<<
"
\"
file
\"
:
\"
"
<<
escapedFilePath
<<
"
\"
,"
;
out
<<
"
\"
line
\"
:"
<<
loc
->
line
<<
""
;
out
<<
"}"
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment