[PATCH] D66526: [utils] Add the llvm-locstats tool

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 02:10:20 PDT 2019


djtodoro marked an inline comment as done.
djtodoro added inline comments.


================
Comment at: utils/llvm-locstats/llvm-locstats.py:120
+  # that as an escape character.
+  cmd_stdout = cmd_stdout.replace('\\','')
+
----------------
djtodoro wrote:
> vsk wrote:
> > I'm a bit confused by this. Mind sharing a link / description for the error?
> > 
> > Did llvm-dwarfdump produce invalid (unescaped) JSON, thus causing python's JSON parser to fail?
> Sure.
> 
> When try to load the JSON from `llvm-dwarfdump` output with `loads()` from json package it trows an exception on Windows platform.
> 
> `Invalid \escape: line 1 column 23 (char 23)`
> 
> The reason of the exception is special character '\' from Windows path. I think that `llvm-dwarfdump` should handle that, so this won't be needed here.
@vsk Do you think we should handle this on the `llvm-dwarfdump` side, since we have the JSON that breaks the specification (the JSON spec)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66526/new/

https://reviews.llvm.org/D66526





More information about the llvm-commits mailing list