[Lldb-commits] [clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-07-07 Thread Eli Friedman via lldb-commits
https://github.com/efriedma-quic commented: If I'm understanding correctly, the way this currently works is that you do normal field layout, then if you discover that the actual offset of a field is less than the offset normal field layout would produce, you assume the struct is packed. This

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: I'm skeptical it's correct to skip all the assertions like this; the assertions are there to ensure the layout of the LLVM IR type matches the layout provided by the RecordLayout. If the LLVM IR layout is wrong, address-related computations will be wrong, and ultimately y

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-31 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: > > The correct answer here is probably to fix the sizes in the RecordLayout > > itself; in particular, the DataSize of the members. > > That would be ideal, but also means we'd have to reflect the various C++ > attributes that affect layout in DWARF. Avoiding adding such

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: Oh, in this particular case, the issue isn't the computed datasize, it's that FieldDecl::isZeroSize() returns the wrong result. If that's the case, maybe we can just change FieldDecl::isZeroSize() to say the field is zero size? So essentially, we pretend all empty field

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: That would mean if someone wrote `struct Empty {}; struct Z { Empty a,b,c; }`, we'd lower it to `{ [3 x i8] }` instead of `{%Empty, %Empty, %Empty}`, which is a bit ugly. Other than that, sure, I guess we could do that. https://github.com/llvm/llvm-project/pull/93809

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-18 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: > > couldn't the inverse be true, then - that codegen should ignore if > > something isZeroSize or not? > > Just to clarify, is the suggestion here to remove the special handling of > `isZeroSize` in the RecordLayoutBuilder? We currently need to distinguish between empty

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-19 Thread Eli Friedman via lldb-commits
efriedma-quic wrote: It's not that hard to compute "no-data": non-RecordDecls are never no-data, RecordDecls are no-data if they don't have a vtable pointer (isDynamicClass()), and all fields are no-data. We can save it in the CGRecordLayout. Assuming that's the route we want to go, of course

[Lldb-commits] [llvm] [libc] [mlir] [flang] [lldb] [clang] [libcxx] [mlir] Skip invalid test on big endian platform (s390x) (PR #80246)

2024-02-02 Thread Eli Friedman via lldb-commits
@@ -0,0 +1,27 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +// Decoding the attribute does not work on big-endian platforms currently +// XFAIL: target=s390x-{{.*}} efriedma-quic wrote: LLVM tests use "host-byteorder-little-end

[Lldb-commits] [lldb] f8499d5 - Emit the correct flags for the PROC CodeView Debug Symbol

2023-05-16 Thread Eli Friedman via lldb-commits
Author: Daniel Paoliello Date: 2023-05-16T10:58:10-07:00 New Revision: f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e URL: https://github.com/llvm/llvm-project/commit/f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e DIFF: https://github.com/llvm/llvm-project/commit/f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e.di