search for: llvmtypeof

Displaying 9 results from an estimated 9 matches for "llvmtypeof".

Did you mean: llvmtype
2010 Jan 11
4
[LLVMdev] Operations on constant array value?
...stant - there doesn't seem to be any way to directly use the resulting [N x i8] value directly and there's no operator that gives me its address. The only way I can see to get a pointer to the string constant array is to go through a global variable, for example: g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + string_literal_number); string_literal_number = string_literal_number + 1; v = LLVMConstString(string_literal, string_literal.Length, 0); LLVMSetInitializer(g, v); elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), LLVMConstInt(LLVMInt32Type(), 0L, 0) }; return LLVMConst...
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers, I am trying to get a return type of a function(from bitcode file) with LLVM-C API, but there seems no appropriate API to do that. I've tried to do that with following code, ---- LLVMModuleRef M; LLVMMemoryBufferRef MemBuf; LLVMValueRef F; // Function LLVMTypeRef RetTy; char *ErrStr; // // -- Load shader module //
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...ulting [N x i8] value directly and there's no operator that gives me > its > > address. > > > > The only way I can see to get a pointer to the string constant array is > to > > go through a global variable, for example: > > > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > > string_literal_number); > > string_literal_number = string_literal_number + 1; > > v = LLVMConstString(string_literal, string_literal.Length, 0); > > LLVMSetInitializer(g, v); > > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > &...
2008 May 22
0
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi Syoyo, > I am trying to get a return type of a function(from bitcode file) with > LLVM-C API, but there seems no appropriate API to do that. From my memory, this info is stored in the function type, so you could look at the function's type and get the info there. Looking the the API docs [1], I find that there is a simple method on Function called getReturnType(). You should thus be
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...be any way to directly use the > resulting [N x i8] value directly and there's no operator that gives me its > address. > > The only way I can see to get a pointer to the string constant array is to > go through a global variable, for example: > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > string_literal_number); > string_literal_number = string_literal_number + 1; > v = LLVMConstString(string_literal, string_literal.Length, 0); > LLVMSetInitializer(g, v); > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > LLVMConstInt(LLVMInt32Type...
2013 May 05
0
[LLVMdev] llvm-c: Types of functions
...LVMValueRef testFunc = LLVMGetNamedFunction(module, "test"); assert(testFunc); if (LLVMIsAFunction(testFunc)) printf("Is a Function\n"); // <-- I do see this message, so far so good else printf("Not a Func\n"); LLVMTypeRef testType; testType = LLVMTypeOf(testFunc); printf("Type is: %d\n", LLVMGetTypeKind(testType)); printf("For reference: Function: %d Pointer: %d\n", LLVMFunctionTypeKind, LLVMPointerTypeKind); if( LLVMIsFunctionVarArg(testType)) printf("is vaarg\n"); else printf("no var...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...; > resulting [N x i8] value directly and there's no operator that gives me its > > address. > > > > The only way I can see to get a pointer to the string constant array is to > > go through a global variable, for example: > > > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > > string_literal_number); > > string_literal_number = string_literal_number + 1; > > v = LLVMConstString(string_literal, string_literal.Length, 0); > > LLVMSetInitializer(g, v); > > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > &...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...#39;t seem to be any way to directly use the resulting [N x i8] value directly and there's no operator that gives me its address. > > The only way I can see to get a pointer to the string constant array is to go through a global variable, for example: > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + string_literal_number); > string_literal_number = string_literal_number + 1; > v = LLVMConstString(string_literal, string_literal.Length, 0); > LLVMSetInitializer(g, v); > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), LLVMConstInt(LLVMInt32Type(), 0L, 0)...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...nd there's no operator that gives me >> its >> > address. >> > >> > The only way I can see to get a pointer to the string constant array is >> to >> > go through a global variable, for example: >> > >> > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + >> > string_literal_number); >> > string_literal_number = string_literal_number + 1; >> > v = LLVMConstString(string_literal, string_literal.Length, 0); >> > LLVMSetInitializer(g, v); >> > elements = { LLVMConstInt(LLVMInt32Ty...