[LLVMdev] c const

Ryan M. Lefever lefever at crhc.uiuc.edu
Wed Aug 8 00:07:13 PDT 2007


How is c's const keyword translated when compiling c into llvm bytecode. 
  I'm specifically interested in const pointer function arguments. 
Consider a function declared as follows in c:

void f(const int* arg);

When I examine f in llvm bytecode, how can I tell that arg is a pointer, 
whose contents can only be read, not written.

Regards,
Ryan



More information about the llvm-dev mailing list