[LLVMdev] Using map structure in llvm IR

Nick Lewycky nicholas at mxc.ca
Thu Nov 13 19:04:46 PST 2008


bhavani krishnan wrote:
> Hi,
> 
> How do I create a function in llvm IR which returns a StringMap datastructure?

I think the simplest way to answer these sorts of questions is to write 
such a function in C++, then use llvm-g++ to compile it, with -emit-llvm.

You can disassemble the bitcode and see how to create one, or you can 
use llc -march=cpp to turn the bitcode into the C++ code that creates 
the equivalent bitcode.

Hope that helps,
Nick Lewycky

> thanks,
> Bhavani
> 
> 
>       
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 




More information about the llvm-dev mailing list