search for: functionstructure

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

2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
...n to have the desired prototype. > > To create a function declaration: > > > From C++, simply call Function::Create and then do not add any basic blocks. > From LLVM assembly, use the keyword "declare" instead of "define": > http://llvm.org/docs/LangRef.html#functionstructure > > > If you're using the JIT, you'll need to do the above, but also may need to > register your functions using > ExecutionEngine::addGlobalMapping. > > http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#a8 > > > Note that the C calling convention do no...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...Where you tweak MyExternalFn to have the desired prototype. To create a function declaration: From C++, simply call Function::Create and then do not add any basic blocks. From LLVM assembly, use the keyword "declare" instead of "define": http://llvm.org/docs/LangRef.html#functionstructure If you're using the JIT, you'll need to do the above, but also may need to register your functions using ExecutionEngine::addGlobalMapping. http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#a8 Note that the C calling convention do not map directly to LLVM IR for many cases, s...
2008 Aug 19
5
[LLVMdev] Please help with LLVM C++ integration
Hello, I got very interested in LLVM project, and I decided to start writing my own scripting language based on it. By studying the documentation, I could not find how to call external function, written in C. That is, I have a set of functions written in C/C++, I generate code, using LLVM C++ interface, how can I call(or register in machine in run-time) my external functions? Maybe I just missed
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...t; > > To create a function declaration: > > > > > > From C++, simply call Function::Create and then do not add any basic > blocks. > > From LLVM assembly, use the keyword "declare" instead of "define": > > http://llvm.org/docs/LangRef.html#functionstructure > > > > > > If you're using the JIT, you'll need to do the above, but also may > need to > > register your functions using > > ExecutionEngine::addGlobalMapping. > > > > http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#a8 > > >...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...ype. >> >> To create a function declaration: >> >> >> From C++, simply call Function::Create and then do not add any basic blocks. >> From LLVM assembly, use the keyword "declare" instead of "define": >> http://llvm.org/docs/LangRef.html#functionstructure >> >> >> If you're using the JIT, you'll need to do the above, but also may need to >> register your functions using >> ExecutionEngine::addGlobalMapping. >> >> http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#a8 >> >> >>...
2012 Apr 19
1
[LLVMdev] Switch + Addresses of functions
Is it possible to use address of function in case block of switch instruction? I understand that it should be constants only, but in llvm reference i founded that: "The addresses of global variables and functions are always implicitly valid (link-time) constants. " Yours sincerely, Kadysev Mikhail -------------- next part -------------- An HTML attachment was scrubbed... URL:
2005 Jan 13
2
[LLVMdev] the pred_begin and pred_end of BasicBlock
Sorry, still a bit confused. Say we have two basic blocks: A and B. B has a label. There is no branch/control flow instructions explicit uses B. like this: A: code sequence does not contain br/other control flow instruction B: lable_of_b: code sequence Is A still a predecessor of B? Thanks. Chris Lattner wrote: > On Thu, 13 Jan 2005, Zhou Feng wrote: > >> hi, >> I'm