search for: allocapt

Displaying 2 results from an estimated 2 matches for "allocapt".

Did you mean: alloc_pt
2007 Aug 08
0
[LLVMdev] c const
...ecode. It isn't. You can verify this quite simply with the following test program: void a(const void *p) { } void b(void *p) { } $ clang --emit-llvm test.c ; ModuleID = 'foo' define void @a(i8* %p) { entry: %p.addr = alloca i8* ; <i8**> [#uses=1] %allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0] store i8* %p, i8** %p.addr ret void } define void @b(i8* %p) { entry: %p.addr = alloca i8* ; <i8**> [#uses=1] %allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0]...
2007 Aug 08
5
[LLVMdev] c const
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