[llvm-dev] Subclassing LLVM Type
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 9 16:08:03 PDT 2017
On 9 June 2017 at 15:29, Jajoo, Malhar via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Thanks for that , I have read the documentation on this , but I would like to know
> if it would be the right thing to do , ie , changing the enum within llvm::Type
Well, I find the idea of a non-canonical DummyType slightly disturbing
(I don't think it's something we'd ever support officially). But you
might be able to make it work and if you need dyn_cast then modifying
that enum is about the only way to get it.
Do you know that there's such a thing as an "opaque type" in LLVM, by
the way? You haven't said what you need this DummyType for but it
might serve as a replacement. Basically you start off with an
unspecified struct type that you can then fill the details in for
> and I'm slightly unclear on how I can update the C binding ?
> Can someone kindly clarify that ?
Can't help you there, I'm afraid. I've never used the C API and barely
looked at it.
More information about the llvm-dev