forked from OSchip/llvm-project
0a466fc209
(Take 2: this patch re-applies r306625, which was reverted in r306629. This patch includes only trivial fixes.) In Python2 and Python3, the various (non-)?Unicode string types are sort of spaghetti. Python2 has unicode support tacked on via the 'unicode' type, which is distinct from 'str' (which are bytes). Python3 takes the "unicode-everywhere" approach, with 'str' representing a Unicode string. Both have a 'bytes' type. In Python3, it is the only way to represent raw bytes. However, in Python2, 'bytes' is an alias for 'str'. This leads to interesting problems when an interface requires a precise type, but has to run under both Python2 and Python3. The previous logic appeared to be correct in all cases, but went through more layers of indirection than necessary. This change does the necessary conversions in one shot, with documentation about which paths might be taken in Python2 or Python3. Changes from r306625: some tests just print binary outputs, so in those cases, fall back to str() in Python3. For googletests, add one missing call to to_string(). (Tested by verifying the visible breakage with Python3. Verified that everything works in py2 and py3.) llvm-svn: 306643 |
||
---|---|---|
.. | ||
FileCheck | ||
KillTheDoctor | ||
LLVMVisualizers | ||
Misc | ||
PerfectShuffle | ||
TableGen | ||
Target/ARM | ||
bugpoint | ||
count | ||
crosstool | ||
emacs | ||
fpcmp | ||
gdb-scripts | ||
git | ||
git-svn | ||
jedit | ||
kate | ||
lint | ||
lit | ||
llvm-build | ||
llvm-lit | ||
not | ||
opt-viewer | ||
release | ||
sanitizers | ||
testgen | ||
textmate | ||
unittest | ||
valgrind | ||
vim | ||
vscode | ||
yaml-bench | ||
DSAclean.py | ||
DSAextract.py | ||
GenLibDeps.pl | ||
GetRepositoryPath | ||
GetSourceVersion | ||
LLVMBuild.txt | ||
UpdateCMakeLists.pl | ||
abtest.py | ||
bisect | ||
bisect-skip-count | ||
check-each-file | ||
clang-parse-diagnostics-file | ||
codegen-diff | ||
countloc.sh | ||
create_ladder_graph.py | ||
extract_symbols.py | ||
findmisopt | ||
findoptdiff | ||
findsym.pl | ||
getsrcs.sh | ||
lldbDataFormatters.py | ||
llvm-compilers-check | ||
llvm-native-gxx | ||
llvm.grm | ||
llvmdo | ||
llvmgrep | ||
makellvm | ||
prepare-code-coverage-artifact.py | ||
schedcover.py | ||
shuffle_fuzz.py | ||
sort_includes.py | ||
test_debuginfo.pl | ||
update_llc_test_checks.py | ||
update_test_checks.py | ||
wciia.py |