[haskell-llvm] [Haskell-cafe] LLVM, type-level?
nathan.d.howell at gmail.com
Tue Dec 7 18:54:04 EST 2010
On Tue, Dec 7, 2010 at 2:27 PM, Lally Singh <lally.singh at gmail.com> wrote:
> I'm writing a haskell program that takes in a text file describing a
> structure. It will generate an llvm bytecode'd program defining
> main(), that will read its first argument to be a shared memory
> handle, attach that handle to its own address space, and read one of
> those structures out of it, dumping it to the console via printf().
> So, I need to figure out how to read the arguments passed to my
> llvm-generated main.
The emitted bitcode 'main' function will need a standard looking main signature:
i32 @main(i32 %argc, i8** %argv)
then you can use getelementptr to index into argv
More information about the Haskell-llvm