Displaying 7 results from an estimated 7 matches for "llvmcontextcreate".
2009 Sep 15
3
[LLVMdev] C API linking problem
...ide why I can't get the below simple C API test to
link? This is on a 32-bit Gentoo Linux system and LLVM TOT which was
compiled with enable-optimized, gcc is 4.3.2.
15:26|melis at juggle2:~/c/llvmpy> cat t.c
#include "llvm-c/Core.h"
int main()
{
LLVMContextRef ctx;
ctx = LLVMContextCreate();
return 0;
}
15:29|melis at juggle2:~/c/llvmpy> llvm-config --cflags --ldflags --libs all
-I/home/melis/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS -O3 -fomit-frame-pointer -fPIC
-L/home/melis/llvm/lib -lpthread -ldl -lm
-lLLVMLinker -lLLVMipo -lLL...
2009 Sep 15
0
[LLVMdev] C API linking problem
"Paul Melis" <llvm at assumetheposition.nl> writes:
> 15:29|melis at juggle2:~/c/llvmpy> gcc -W -Wall -o blah `llvm-config --cflags
> --ldflags --libs all` t.c
> /tmp/ccs4MbKp.o: In function `main':
> t.c:(.text+0x21): undefined reference to `LLVMContextCreate'
> collect2: ld returned 1 exit status
>
> 15:29|melis at juggle2:~/c/llvmpy> nm ~/llvm/lib/libLLVMCore.a | grep
> LLVMContextCreate
> 00001bc0 T LLVMContextCreate
Try this:
gcc t.c -W -Wall -o blah `llvm-config --cflags --libs all --ldflags`
--
Óscar
2009 Sep 15
0
[LLVMdev] C API linking problem
...lt;llvm at assumetheposition.nl> writes:
>>> 15:29|melis at juggle2:~/c/llvmpy> gcc -W -Wall -o blah `llvm-config
>>> --cflags
>>> --ldflags --libs all` t.c
>>> /tmp/ccs4MbKp.o: In function `main':
>>> t.c:(.text+0x21): undefined reference to `LLVMContextCreate'
>>> collect2: ld returned 1 exit status
>>>
>>> 15:29|melis at juggle2:~/c/llvmpy> nm ~/llvm/lib/libLLVMCore.a | grep
>>> LLVMContextCreate
>>> 00001bc0 T LLVMContextCreate
>>
>> Try this:
>>
>> gcc t.c -W -Wall -o blah `l...
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
Hi All
I am a novice LLVM user trying to use LLVMConstIntOfString using the c api
to get a integer of arbitrary size from a hexadecimal string.
Example code follows:
LLVMContextRef context = LLVMContextCreate();
LLVMValueRef value =
LLVMConstIntOfString(LLVMInt64TypeInContext(context), "0x0000000f0000ffff",
16);
This is working properly as expected.
However I have noticed that if the bits are not prefixed with enough zeros
to correspond to 32 or 64 bits this gives me:
For 0x0fff := 0xfff...
2012 Apr 25
2
[LLVMdev] Crash in JIT
...can add.
-DavidM
PS: below is my complete source.
#include <stdio.h>
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
#include "llvm-c/Core.h"
#include "llvm-c/ExecutionEngine.h"
int main(int argc, const char * argv[])
{
LLVMContextRef llvm;
llvm = LLVMContextCreate();
LLVMModuleRef module;
module = LLVMModuleCreateWithNameInContext("MyModule", llvm);
//LLVMSetDataLayout(module, "i686-apple-darwin11"); <-- is needed? What is correct?
LLVMSetTarget(module, "i686-apple-darwin11");
LLVMTypeRef int32...
2012 Apr 25
0
[LLVMdev] Crash in JIT
...can add.
-DavidM
PS: below is my complete source.
#include <stdio.h>
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
#include "llvm-c/Core.h"
#include "llvm-c/ExecutionEngine.h"
int main(int argc, const char * argv[])
{
LLVMContextRef llvm;
llvm = LLVMContextCreate();
LLVMModuleRef module;
module = LLVMModuleCreateWithNameInContext("MyModule", llvm);
//LLVMSetDataLayout(module, "i686-apple-darwin11"); <-- is needed? What is correct?
LLVMSetTarget(module, "i686-apple-darwin11");
LLVMTypeRef int32 = LLVM...
2013 May 05
0
[LLVMdev] llvm-c: Types of functions
...handle (LLVMValueRef) to the function and from that
pull it's type as a LLVMTypeRef. This would be a 'function type', from which I can pull info about
the return type and iterate the arguments, etc. At least, that's what I'm trying to do in my code:
LLVMContextRef context = LLVMContextCreate();
LLVMMemoryBufferRef fileMemBuff;
LLVMCreateMemoryBufferWithContentsOfFile(
"test.bin", &fileMemBuff, &msg);
LLVMModuleRef module;
LLVMGetBitcodeModuleInContext(
context, fileMemBuff, &module, &msg);
LLVMValueRef testFun...