how to get data type of function's formal parameter?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to get data type of function's formal parameter?

Bakhvalov, Denis via cfe-dev
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

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev