[llvm-dev] Does llvm has IR level implementation of vector and map?

Yafei Liu via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 16 01:38:39 PDT 2019


Hi all, I want to add the concept of vector and map (just like vector and
map in C++) in language level, for example:

var shoppingList = ["catfish", "water", "tulips"]


   1. var occupations = [
   2. "Malcolm": "Captain",
   3. "Kaylee": "Mechanic",
   4. ]


(this is how Swift language declarate a vector and a map indeed)

My question is I don't want to implement things like vector or map in my
compiler code, so this any implemented classes in llvm API which can help
me to do this?

Or, I know how to change the code above to C++, is there any way I can turn
the paring into calling C++ libraries?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191016/3f24e908/attachment.html>


More information about the llvm-dev mailing list