aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-11-03 06:54:39 -0800
committerYonghong Song <yhs@fb.com>2019-11-03 08:18:28 -0800
commitc4305337716f0f3eb76400f288cd0dee001d744d (patch)
tree02a6de3a7f5d13271f203583e4c352b827abdc57 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
parent983c4dd8edbed9e28b2f4b2f91759f63acee326a (diff)
downloadllvm-c4305337716f0f3eb76400f288cd0dee001d744d.zip
llvm-c4305337716f0f3eb76400f288cd0dee001d744d.tar.gz
llvm-c4305337716f0f3eb76400f288cd0dee001d744d.tar.bz2
[BPF] fix a bug in __builtin_preserve_field_info() with FIELD_BYTE_SIZE
During deriving proper bitfield access FIELD_BYTE_SIZE, function Member->getStorageOffsetInBits() is used to get llvm IR type storage offset in bits so that the byte size can permit aligned loads/stores with previously derived FIELD_BYTE_OFFSET. The function should only be used with bitfield members and it will assert if ASSERT is turned on during cmake build. Constant *getStorageOffsetInBits() const { assert(getTag() == dwarf::DW_TAG_member && isBitField()); if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData())) return C->getValue(); return nullptr; } This patch fixed the issue by using Member->isBitField() directly and a test case is added to cover this missing case. This issue is discovered when running Andrii's linux kernel CO-RE tests. Differential Revision: https://reviews.llvm.org/D69761
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h')
0 files changed, 0 insertions, 0 deletions