<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>67c588c4 - [lldb] Generalize empty record size computation to avoid giving empty C++ structs a size of 0</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/lldb/test/API/lang/cpp/sizeof/Makefile#67c588c4</link>
        <description>[lldb] Generalize empty record size computation to avoid giving empty C++ structs a size of 0C doesn&apos;t allow empty structs but Clang/GCC support them and give them a size of 0.LLDB implements this by checking the tag kind and if it&apos;s `DW_TAG_structure_type` thenwe give it a size of 0 via an empty external RecordLayout. This is done because ourinternal TypeSystem is always in C++ mode (which means we would give them a sizeof 1).The current check for when we have this special case is currently too lax as types with`DW_TAG_structure_type` can also occur in C++ with types defined using the `struct`keyword. This means that in a C++ program with `struct Empty{};`, LLDB would return`0` for `sizeof(Empty)` even though the correct size is 1.This patch removes this special case and replaces it with a generic approach that justassigns empty structs the byte_size as specified in DWARF. The GCC/Clang specialcase is handles as they both emit an explicit `DW_AT_byte_size` of 0. And if anothercompiler decides to use a different byte size for this case then this should also behandled by the same code as long as that information is provided via `DW_AT_byte_size`.Reviewed By: werat, shafikDifferential Revision: https://reviews.llvm.org/D105471

            List of files:
            /llvm-project-15.0.7/lldb/test/API/lang/cpp/sizeof/Makefile</description>
        <pubDate>Thu, 22 Jul 2021 11:25:16 +0000</pubDate>
        <dc:creator>Raphael Isemann &lt;teemperor@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
