llvm-fs is a set of bindings to the LLVM C API for F#
Questions tagged [llvm-fs]
6 questions
13
votes
2 answers
DllImport can't find dll even though dll is in same folder as executable
I'm trying to use the llvm-fs project, which provides llvm bindings for F#. I have compiled the LLVM-3.1.dll file with --enable-shared and it now resides in same directory as my compiled executable (I checked with Environment.CurrentDirectory). The…

Callum Rogers
- 15,630
- 17
- 67
- 90
4
votes
0 answers
Putting source information into LLVM bitcode files for debugging compiler errors
I'm making a basic compiler and want to put the source lines of code somewhere near the llvm code that is produced for easy debugging. For example:
proc f(a:Int, b:Int):Int {
return a + b;
}
start {
print f(1,2);
return 0;
}
Should be…

Callum Rogers
- 15,630
- 17
- 67
- 90
3
votes
1 answer
Unbalanced stack warnings from LLVM bindings
After weeks of effort I have managed to write F# programs that use LLVM for JIT compilation. However, whenever I run my programs in Visual Studio 2010 with the debugger attached (i.e. by pressing F5) I get the following warning:
Now, I get this…

J D
- 48,105
- 13
- 171
- 274
1
vote
1 answer
stack overflow in F# compiler running under mono
I'm updating the tooling for my project llvm-fs, so I installed the new version of mono and tried to compile it. Using either mono 3.10.0 with fsharpc 3.1 under OS X or mono 3.2.8 with fsharpc 3.0 under ubuntu the compile fails with a stack…

Keith
- 2,820
- 5
- 28
- 39
1
vote
1 answer
How to add metadata nodes using the LLVM C Api/llvm-fs bindings
I'm trying to add metadata nodes to a program, either onto the instructions or as global metadata. How do I do this with the LLVM C API? It now provides a function LLVMAddNamedMetadataOperand (as found from this question) but I can't seem to see how…

Callum Rogers
- 15,630
- 17
- 67
- 90
1
vote
1 answer
How can I call this native function from F#? (LLVMCreateJITCompilerForModule)
I'm using the llvm-fs bindings and one method I would like to call is createJITCompilerForModule which is an extern to the native method LLVMCreateJITCompilerForModule in the LLVM C api. The author of llvm-fs has stated he can't make a 'nice'…

Callum Rogers
- 15,630
- 17
- 67
- 90