forked from OSchip/llvm-project
01b595c0cb
Summary: In my next step at cleaning up modify-python-lldb.py, I started focusing on equality comparison. To my surprise, I found out that both python and c++ versions of the SBType class implement equality comparison, but each one does it differently. While the python version was implemented in terms of type name equality, the C++ one used a deep comparison on the underlying objects. Removing the python version caused one test to fail (TestTypeList). This happened because the c++ version of operator== boiled down to TypePair::operator==, which contains two items: the compiler_type and type_sp. In this case, the compiler_type was identical, but one of the objects had the type_sp field unset. I tried fixing the code so that both objects keep their type_sp member, but it wasn't easy, because there are so many operations which just work with the CompilerType types, and so any operation on the SBType (the test in question was doing GetPointeeType on the type of one variable and expecting it to match the type of another variable), cause that second member to be lost. So instead, here I relax the equality comparison on the TypePair class. Now, this class ignores the type_sp for the purposes of comparison, and uses the CompilerType only. This seems reasonable, as each TypeSP is able to convert itself to a CompilerType. Reviewers: clayborg, aprantl, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D59217 llvm-svn: 356048 |
||
---|---|---|
.. | ||
Python | ||
Xcode | ||
interface | ||
swig_bot_lib | ||
CMakeLists.txt | ||
analyze-project-deps.py | ||
build-lldb-llvm-clang | ||
buildbot.py | ||
checkpoint-llvm.pl | ||
disasm-gdb-remote.pl | ||
finish-swig-wrapper-classes.sh | ||
finishSwigWrapperClasses.py | ||
framework-header-fix.sh | ||
generate-vers.pl | ||
get_relative_lib_dir.py | ||
install-lldb.sh | ||
install_custom_python.py | ||
lldb.swig | ||
macos-setup-codesign.sh | ||
prepare_bindings.py | ||
sed-sources | ||
shush | ||
sort-pbxproj.rb | ||
swig_bot.py | ||
use_lldb_suite.py | ||
utilsArgsParse.py | ||
utilsDebug.py | ||
utilsOsType.py | ||
verify_api.py |