Skip to content
Commit c929f7ad authored by Adrian Prantl's avatar Adrian Prantl
Browse files

Fix a crash when emitting DIEs for variable-length arrays

VLAs may refer to a previous DIE to express the DW_AT_count of their
type. Clang generates an artificial "vla_expr" variable for this. If
this DIE hasn't been created yet LLVM asserts. This patch fixes this
by sorting the local variables so that dependencies come before they
are needed. It also replaces the linear scan in DWARFFile with a
std::map, which can be faster.

Differential Revision: https://reviews.llvm.org/D42940

llvm-svn: 324412
parent 0ccef9ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment