[LLVMdev] Modifying Named Structure Types
Eli Friedman
eli.friedman at gmail.com
Tue Aug 14 13:58:16 PDT 2012
On Tue, Aug 14, 2012 at 1:23 PM, Joe Yan <jyan2 at umd.edu> wrote:
> Hi,
>
> I am trying to write a module pass that traverses through named structure
> types defined and modifies the type of certain fields in these named types.
> Is there any simple way of doing this? I am not quite sure how to get the
> LLVMContext's pImpl working from a pass since LLVMContextImpl is
> forward-declared.
Mutating types is unsupported, and generally a bad idea. Make a new
named type, then replace all the values which use that type with
values which use the new type.
-Eli
More information about the llvm-dev
mailing list