[PATCH] D118005: [hmaptool] Fix string decoding for Python 3

2022-03-03 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb4c1cbff79d0: [hmaptool] Fix string decoding for Python 3 
(authored by smeenai).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118005

Files:
  clang/utils/hmaptool/hmaptool


Index: clang/utils/hmaptool/hmaptool
===
--- clang/utils/hmaptool/hmaptool
+++ clang/utils/hmaptool/hmaptool
@@ -100,7 +100,7 @@
 raise SystemExit("error: %s: invalid string index" % (
 idx,))
 end_idx = self.strtable.index(0, idx)
-return self.strtable[idx:end_idx]
+return self.strtable[idx:end_idx].decode()
 
 @property
 def mappings(self):


Index: clang/utils/hmaptool/hmaptool
===
--- clang/utils/hmaptool/hmaptool
+++ clang/utils/hmaptool/hmaptool
@@ -100,7 +100,7 @@
 raise SystemExit("error: %s: invalid string index" % (
 idx,))
 end_idx = self.strtable.index(0, idx)
-return self.strtable[idx:end_idx]
+return self.strtable[idx:end_idx].decode()
 
 @property
 def mappings(self):
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D118005: [hmaptool] Fix string decoding for Python 3

2022-03-03 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
Herald added a project: All.

LGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118005

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D118005: [hmaptool] Fix string decoding for Python 3

2022-01-23 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision.
smeenai added a reviewer: bruno.
smeenai requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Our "strings" were actually bytes, which made verbose dumping fail.
Decode them so they actually become strings.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118005

Files:
  clang/utils/hmaptool/hmaptool


Index: clang/utils/hmaptool/hmaptool
===
--- clang/utils/hmaptool/hmaptool
+++ clang/utils/hmaptool/hmaptool
@@ -100,7 +100,7 @@
 raise SystemExit("error: %s: invalid string index" % (
 idx,))
 end_idx = self.strtable.index(0, idx)
-return self.strtable[idx:end_idx]
+return self.strtable[idx:end_idx].decode()
 
 @property
 def mappings(self):


Index: clang/utils/hmaptool/hmaptool
===
--- clang/utils/hmaptool/hmaptool
+++ clang/utils/hmaptool/hmaptool
@@ -100,7 +100,7 @@
 raise SystemExit("error: %s: invalid string index" % (
 idx,))
 end_idx = self.strtable.index(0, idx)
-return self.strtable[idx:end_idx]
+return self.strtable[idx:end_idx].decode()
 
 @property
 def mappings(self):
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits