aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2024-02-29 21:40:02 +0000
committerGitHub <noreply@github.com>2024-02-29 21:40:02 +0000
commit07ffb7e294767b74e43f90e9ab3d713da929b907 (patch)
tree5388e2430365572a71a198513f2b986f442b59b6 /clang/lib/Frontend/CompilerInvocation.cpp
parent4d12f708967f932b584be5fc4efd17ad3272f87c (diff)
downloadllvm-07ffb7e294767b74e43f90e9ab3d713da929b907.zip
llvm-07ffb7e294767b74e43f90e9ab3d713da929b907.tar.gz
llvm-07ffb7e294767b74e43f90e9ab3d713da929b907.tar.bz2
[lldb][ClangASTImporter] Import record layouts from origin if available (#83295)
Layout information for a record gets stored in the `ClangASTImporter` associated with the `DWARFASTParserClang` that originally parsed the record. LLDB sometimes moves clang types from one AST to another (in the reproducer the origin AST was a precompiled-header and the destination was the AST backing the executable). When clang then asks LLDB to `layoutRecordType`, it will do so with the help of the `ClangASTImporter` the type is associated with. If the type's origin is actually in a different LLDB module (and thus a different `DWARFASTParserClang` was used to set its layout info), we won't find the layout info in our local `ClangASTImporter`. In the reproducer this meant we would drop the alignment info of the origin type and misread a variable's contents with `frame var` and `expr`. There is logic in `ClangASTSource::layoutRecordType` to import an origin's layout info. This patch re-uses that infrastructure to import an origin's layout from one `ClangASTImporter` instance to another. rdar://123274144
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions