[LLVMdev] ML types in LLVM

Wesley W. Terpstra wesley at terpstra.ca
Sun Jun 14 05:59:12 PDT 2009

On Sun, Jun 14, 2009 at 4:32 AM, Nick Lewycky<nicholas at mxc.ca> wrote:
> Wesley W. Terpstra wrote:
>> Is there absolutely no way to generate a new type? Not even an 'opaque' one?
> Each time you say "opaque" in a .ll (or call OpaqueType::get in the C++
> API) you get yourself a new distinct opaque type.

Ok. That's what I thought it did which is why I tried it in the first
place. I must have done something wrong. Thank you!

>> Also, I couldn't find a no-op instruction in LLVM. In some places it
>> would be convenient to say: '%x = %y'. For the moment I'm doing a
>> bitcast from the type back to itself, which is rather awkward.
> There is none, using a bitcast is the workaround. LLVM's optimizers will
> fix it up.

I'll keep doing what I'm doing then.

More information about the llvm-dev mailing list