search for: myexternalfn

Displaying 5 results from an estimated 5 matches for "myexternalfn".

2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
...ly create a declaration for the function—a Function > with no body—and call it as any other function in your program. (Also, of > course, link with a library to define the symbols.) It might be instructive > to examine the llvm-gcc -S -emit-llvm output of a program like this: > > int MyExternalFn(int, int, int); > > int main(int, const char**, const char**) { > return MyExternalFn(1, 2, 3); > } > > > Where you tweak MyExternalFn to have the desired prototype. > > To create a function declaration: > > > From C++, simply call Function::Create and then do...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...ative code. Simply create a declaration for the function—a Function with no body—and call it as any other function in your program. (Also, of course, link with a library to define the symbols.) It might be instructive to examine the llvm-gcc -S -emit- llvm output of a program like this: int MyExternalFn(int, int, int); int main(int, const char**, const char**) { return MyExternalFn(1, 2, 3); } 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 t...
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
...-a > Function > > with no body-and call it as any other function in your program. (Also, > of > > course, link with a library to define the symbols.) It might be > instructive > > to examine the llvm-gcc -S -emit-llvm output of a program like this: > > > > int MyExternalFn(int, int, int); > > > > int main(int, const char**, const char**) { > > return MyExternalFn(1, 2, 3); > > } > > > > > > Where you tweak MyExternalFn to have the desired prototype. > > > > To create a function declaration: > > > > &...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...ion for the function—a Function >> with no body—and call it as any other function in your program. (Also, of >> course, link with a library to define the symbols.) It might be instructive >> to examine the llvm-gcc -S -emit-llvm output of a program like this: >> >> int MyExternalFn(int, int, int); >> >> int main(int, const char**, const char**) { >> return MyExternalFn(1, 2, 3); >> } >> >> >> Where you tweak MyExternalFn to have the desired prototype. >> >> To create a function declaration: >> >> >> Fro...