[llvm-dev] Identify c-style pointer to array

alex via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 24 23:28:09 PDT 2017


HI all,

in C/C++, arrays and matrices often are passed as pointer so functions.
Suppose I'd like to write a pass operating on arrays , for example an
array of doubles passed via double * and checking for the type i will
identify a pointer to double (isAggregateType()=false).

As this style of passing arrays using pointers is widely used, I wonder
if there is any chance to identify a pointer type function argument (or
even pointer to pointer in the case of a 2d array) as array?

Thx
Alexander



More information about the llvm-dev mailing list