search for: llvmconststruct

Displaying 4 results from an estimated 4 matches for "llvmconststruct".

2010 Jan 26
2
[LLVMdev] Returning a structure
...ue or by reference in an argument would seem to be details of the platform’s ABI. Does my compiler really need to be aware of these details, or can I just return a structure as per the documentation quoted above? If the latter case, how do I build that instruction with the builder? Attempts to use LLVMConstStruct are crashing, I assume because the arguments to it in my use are not actually constants (: A quick search through IRBuilder didn’t give me any clues either, so here I am (: Thanks in advance for any help you can give me, Sincerely, Rob -- Rob Rix, Unknown Quantity Monochrome Industries
2010 Jan 27
0
[LLVMdev] Returning a structure
...as per the documentation quoted above? Yes, it needs to be aware of the details. There has been some discussion of providing a helper library for doing this, see http://llvm.org/bugs/show_bug.cgi?id=4246 > If the latter case, how do I build that instruction with the builder? Attempts to use LLVMConstStruct are crashing, I assume because the arguments to it in my use are not actually constants (: A quick search through IRBuilder didn’t give me any clues either, so here I am (: What instruction, the funky return statement? You create a return statement for which the argument is a Value of the appropr...
2013 Jan 09
2
[LLVMdev] Global variable initializer type does not match global variable type
...@llvm.globals.add llvm_ty, name datum.initializer = LLVM::ConstantStruct.const([ emit_object(klass, klass_name).bitcast_to( @types[Monotype.of(VI::Class)]), LLVM::Constant.null(emit_class_body_type(klass)) ]) LLVM::ConstantStruct.const eventually calls the LLVMConstStruct method with the appropriate arguments; LLVM::Constant.null corresponds to LLVMConstNull. Any hints are greatly appreciated. -- WBR, Peter Zotov. [1]: http://fehu.whitequark.org/files/gvar-init.bc -------------- next part -------------- A non-text attachment was scrubbed... Name: test.bc...
2010 Jan 27
2
[LLVMdev] Returning a structure
...eds are relatively simple, as I’m not interfacing with arbitrary C functions, no var-args, or anything at all out of the ordinary. Literally the most complicated thing I need to do is return a structure. >> If the latter case, how do I build that instruction with the builder? Attempts to use LLVMConstStruct are crashing, I assume because the arguments to it in my use are not actually constants (: A quick search through IRBuilder didn’t give me any clues either, so here I am (: > > What instruction, the funky return statement? You create a return statement for > which the argument is a Value...