commit | 034eaeddc30cbaf273744580f15325514d5fb928 | [log] [tgz] |
---|---|---|
author | Michael Buch <michaelbuch12@gmail.com> | Tue May 20 09:44:26 2025 +0100 |
committer | GitHub <noreply@github.com> | Tue May 20 09:44:26 2025 +0100 |
tree | 38e8742a3e700b9057eabb964747c73d16a9410f | |
parent | 32a1b6a70b3ec9066dd70ccf538f735a5c58e031 [diff] |
[lldb][DataFormatters] Adjust retrieval of unordered_map element type (#140256) A user ran into an issue where the libc++ `std::unordered_map` formatter fails because it can't deduce the `element_type`. That happens because the `node_type` is a forwad declaration. And, in fact, dsymutil stripped the definition for `std::__1::__hash_node<...>` for a particular instantiation. While I'm still unclear whether this is a dsymutil bug, this patch works around said issue by getting the element type from the `__table_` member. Drive-by: - Set the `m_element_type` in `Update`, which is where the other members are initialized I don't have a reduced example of this unfortunately. But the crux of the issue is that `std::__1::__hash_node<...>` only has a forward declaration in the dsym. Then trying to call `GetTypeTemplateArgument` on that `CompilerType` fails. And even if the definition was present in the dsym it seems like we're stopped in a context where the CU only had a forward declaration DIE for that type and the `node_type` never ends up being completed with the definition that lives in another CU. rdar://150813798
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.