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
666255e0
Commit
666255e0
authored
Dec 03, 2018
by
Philip Trettner
Browse files
Merge branch 'escape-windows-paths' into 'master'
Escape windows path backslashes in JSON output See merge request
!1
parents
e82f8872
5f4d8d05
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aion/Tracer.output.cc
View file @
666255e0
...
...
@@ -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