简体   繁体   中英

Constructing Unions via the LLVM C++ Api

I'm using LLVM to insert a function where of the arguments is a union, and I'm really struggling to work out how to create the union argument. I can't find anything about defining union types in the LLVM api (the union type is actually defined already in a separate file, but I can't even get the type builder to use this to create the correct type). How do I proceed.

Unions do not exist on the LLVM type level. You must do all requisite casting, byte blitting and such yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM