summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-09-24 22:38:43 +0000
committerYonghong Song <yhs@fb.com>2019-09-24 22:38:43 +0000
commit1487bf6c82a88ff3342031b6ef82415377290ad1 (patch)
treea894a255873e85ed6a128bda45d35231533ec7b3 /lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
parent819ff64ea0444994369ec78353eec86ea6a72b01 (diff)
downloadbcm5719-llvm-1487bf6c82a88ff3342031b6ef82415377290ad1.tar.gz
bcm5719-llvm-1487bf6c82a88ff3342031b6ef82415377290ad1.zip
[BPF] Generate array dimension size properly for zero-size elements
Currently, if an array element type size is 0, the number of array elements will be set to 0, regardless of what user specified. This implementation is done in the beginning where BTF is mostly used to calculate the member offset. For example, struct s {}; struct s1 { int b; struct s a[2]; }; struct s1 s1; The BTF will have struct "s1" member "a" with element count 0. Now BTF types are used for compile-once and run-everywhere relocations and we need more precise type representation for type comparison. Andrii reported the issue as there are differences between original structure and BTF-generated structure. This patch made the change to correctly assign "2" as the number elements of member "a". Some dead codes related to ElemSize compuation are also removed. Differential Revision: https://reviews.llvm.org/D67979 llvm-svn: 372785
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud