[cfe-dev] how to get data type of function's formal parameter?

Q Z via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 19 19:22:09 PDT 2015


Hello,

I want to get  data type and its size of function's formal parameter. for
example, I want to get the data tyoe of memcpy's first parameter. I want to
get "%10" and how many bytes it occupies in memory. I kown the first
parameter of memcpy is char* , but I don't want the size of pointer, but
the size of char array.

example:
%10 = bitcast [16 x i8]* %name15 to i8*, !dbg !454
 %11 = load i8*, i8** %name.addr, align 8, !dbg !455
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %10, i8* %11, i64 15, i32 1, i1
false), !dbg !454

how can I get this? Please help me.

zhaoqian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150820/70422edb/attachment.html>


More information about the cfe-dev mailing list