search for: llvmhasinitializer

Displaying 7 results from an estimated 7 matches for "llvmhasinitializer".

2009 Oct 11
3
[LLVMdev] Some additions to the C bindings
...ents: +/** See the llvm::Use class. */ +typedef struct LLVMOpaqueUse *LLVMUseRef; My understanding is that this actually conceptually corresponds to use_iterator, not Use. Please name this something like LLVMUseIterator. Also, please document this, not just referring to llvm::Use. +int LLVMHasInitializer(LLVMValueRef GlobalVar); LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar); Isn't LLVMHasInitializer just LLVMGetInitializer(x) != 0? Otherwise, looks ok to me, -Chris
2009 Oct 07
0
[LLVMdev] Some additions to the C bindings
On Tue, Oct 6, 2009 at 2:13 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote: > My front-end is sync'd with the trunk now, and working well, but it > required some additional functions exposed in the C bindings.  I > hereby submit them for review and approval for inclusion in the trunk. > LLVMGetAttribute had a bug in it. Here's the revised version of the patch
2009 Oct 06
3
[LLVMdev] Some additions to the C bindings
My front-end is sync'd with the trunk now, and working well, but it required some additional functions exposed in the C bindings. I hereby submit them for review and approval for inclusion in the trunk. -------------- next part -------------- A non-text attachment was scrubbed... Name: cbindings.patch Type: application/octet-stream Size: 7269 bytes Desc: not available URL:
2009 Oct 11
0
[LLVMdev] Some additions to the C bindings
On Sun, Oct 11, 2009 at 3:09 PM, Chris Lattner <clattner at apple.com> wrote: > > Isn't LLVMHasInitializer just  LLVMGetInitializer(x) != 0? Last time I tried that, LLVMGetInitializer threw an assertion when the global variable didn't actually have one. Has this changed?
2009 Oct 11
3
[LLVMdev] Some additions to the C bindings
On Oct 11, 2009, at 1:25 PM, Kenneth Uildriks wrote: > On Sun, Oct 11, 2009 at 3:09 PM, Chris Lattner <clattner at apple.com> > wrote: >> >> Isn't LLVMHasInitializer just LLVMGetInitializer(x) != 0? > > Last time I tried that, LLVMGetInitializer threw an assertion when the > global variable didn't actually have one. Has this changed? No idea. It would be more C like to return null. The C implementation of the function can check and return nu...
2009 Oct 08
2
[LLVMdev] Some additions to the C bindings
...ntVals, unsigned Size); /* Constant expressions */ +unsigned LLVMGetConstOpcode(LLVMValueRef ConstantVal); This seems okay with me, but there really should be an LLVMInstruction enum defined instead of a raw unsigned value. Could you also add a LLVMConstExpr that wraps ConstantExpr::get? +int LLVMHasInitializer(LLVMValueRef GlobalVar); Seems fine to me. I can commit this now. +LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn); +LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg); I've never really done much with attributes. What are you using this for?
2009 Oct 08
0
[LLVMdev] Some additions to the C bindings
...onstOpcode(LLVMValueRef ConstantVal); > > > This seems okay with me, but there really should be an LLVMInstruction > enum defined instead of a raw unsigned value. Could you also add a > LLVMConstExpr that wraps ConstantExpr::get? That shouldn't be a problem. > > > +int LLVMHasInitializer(LLVMValueRef GlobalVar); > > > Seems fine to me. I can commit this now. > > > +LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn); > +LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg); > > > I've never really done much with attributes. What are you using this for? &...