(original) (raw)

Recently there was work done to support C's VLAs, I should think you'd be able to make use of that. The bound or count would point to your length field.

--paulr

From: llvm-dev \[mailto:llvm-dev-bounces@lists.llvm.org\] On Behalf Of Nicholas Wilson via llvm-dev
Sent: Wednesday, February 21, 2018 9:15 PM
To: Peter McKinna
Cc: LLVM Developers
Subject: Re: \[llvm-dev\] Dynamic array debugging

With a struct that is {T\* ptr; size\_t length}

e.g.

https://github.com/ldc-developers/ldc/blob/master/gen/dibuilder.cpp#L531

(only difference is that our dynamic arrays are length then pointer)

On 22 Feb 2018, at 12:46 pm, Peter McKinna via llvm-dev <llvm-dev@lists.llvm.org> wrote:

Hi,

Does anyone have any hints as to how one might generate debug info for dynamic arrays using the DIBuilder class?

In this particular case, the length of the array is in the second word of the variable. Just taking the

one dimensional case first and see if I can get that working before moving to higher dimensions.

Thanks

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev