[LLVMdev] Unknown or runtime type in function definition?
Bueno, Denis
denbuen at sandia.gov
Fri Apr 9 14:11:36 PDT 2010
Hello all,
I'm trying to understand a bit of LLVM IR syntax. I have a function
definition which looks like this in IR:
define void @foo(%1* ptr) { ...
The C code for foo has a definition that looks like:
typedef struct bar_struct bar;
... Definition of struct bar_struct ...
void foo(bar *ptr) { ...
I can't whittle down a convenient test source file just now; but I'm trying
to understand what the syntax of the 'define' above means -- specifically,
what does it mean for a parameter to have type '%1*'? What is the semantics
here? Inside the body of @foo, there is an SSA variable %1 -- is that
variable related to the %1 in the type of the parameter? (It doesn't seem
to be, which is why I ask.)
I looked in the LLVM Language Reference manual but couldn't find any type
syntax that corresponded to the type I see for foo's parameter. I'm not
sure where else to look, but I'd be happy to hear any pointers.
Any help is appreciated. Thanks in advance.
-Denis
More information about the llvm-dev
mailing list