Displaying 5 results from an estimated 5 matches for "llvmexternallinkage".
2007 Sep 17
1
[LLVMdev] C interface
Hi Gordon,
> > I'm authoring a C interface to the LLVM IR type system.
It's great to see a C interface being added. A minor niggle:
> +typedef enum {
> + LLVMVoidTypeKind = 0, /* type with no size */
> ...
> +typedef enum {
> + LLVMExternalLinkage = 0,/* Externally visible function */
> ...
> +typedef enum {
> + LLVMDefaultVisibility = 0, /* The GV is visible */
It's defined by the language that the first enumerate's zero so the
initialisation is redundant. As someone reading the source, it would
make me halt and wonder...
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
...ule) {
LLVMValueRef result;
LLVMBasicBlockRef block;
LLVMBuilderRef builder = LLVMCreateBuilder();
LLVMValueRef fullUsername = LLVMAddFunction(module, "NSFullUserName", LLVMFunctionType(LLVMPointerType(LLVMInt8Type(), 0), NULL, 0, 0));
LLVMSetLinkage(fullUsername, LLVMExternalLinkage);
result = LLVMAddFunction(module, "MyFunction", LLVMFunctionType(i8Ptr(), NULL, 0, 0));
block = LLVMAppendBasicBlock(result, "entrypoint");
LLVMPositionBuilderAtEnd(builder, block);
LLVMValueRef returnVal = LLVMBuildCall(builder, fullUsername, NULL, 0,...
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
...unction;
LLVMTypeRef vpFnPrintfArgsType[] = { LLVMPointerType(LLVMInt8Type(), 0)
};
LLVMTypeRef vFnPrintfType = LLVMFunctionType(LLVMInt32Type(),
vpFnPrintfArgsType, 1, 1);
LLVMValueRef vFnPrintf = LLVMAddFunction(modCEx, "printf",
vFnPrintfType);
LLVMSetLinkage(vFnPrintf, LLVMExternalLinkage);
// printf with arguments
LLVMValueRef printfArgTemplate = LLVMBuildGlobalStringPtr(bldr,
template, "privateString");
LLVMValueRef vpArgsPrintf[] = { printfArgTemplate, testValue };
LLVMBuildCall(bldr, vFnPrintf, vpArgsPrintf, 2, "printf");
LLVMBuildRet(bl...
2007 Sep 17
0
[LLVMdev] C interface
On Sep 12, 2007, at 01:01, Gordon Henriksen wrote:
> I'm authoring a C interface to the LLVM IR type system. Since this
> is Really Quite Tedious, I would like to solicit opinions before I
> get too far down any paths that seem offensive. I've attached the
> header, where I've mapped a portion of Module and most of Type and
> its subclasses. This is working, and
2007 Sep 12
7
[LLVMdev] C interface
Hi all,
I'm authoring a C interface to the LLVM IR type system. Since this is
Really Quite Tedious, I would like to solicit opinions before I get
too far down any paths that seem offensive. I've attached the header,
where I've mapped a portion of Module and most of Type and its
subclasses. This is working, and I've built ocaml bindings on top of
it.[1] My intent is to