[llvm-dev] OpaqueType:: get()
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 24 09:25:59 PDT 2018
On Fri, 24 Aug 2018 at 04:49, Ratnesh Tiwari via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I have code that uses OpaqueType::get(), it was used to be in llvm/IR/DerivedType.h , but it is removed now. What should I use for it replacement.
Oh, that must be some pretty old code! I think OpaqueType was removed
in the type system rewrite around LLVM 3.0. Chris wrote a blog about
the changes at the time:
http://blog.llvm.org/2011/11/llvm-30-type-system-rewrite.html.
The replacement for an opaque type is a StructType that hasn't had its
body filled in yet. I.e. what you get back from StructType::create.
> Also, it is using #include <llvm/Bytecode/WriteBytecodePass.h> , but I do not found any WriteBytecodePass.h in my source code. Please tell me, what should I use in replacement of these.
Bytecode went away even earlier in LLVM's history. The replacement is
called bitcode. The header you'll need is
llvm/Bitcode/BitcodeWriter.h, and it's not a pass any more. Possibly
the simplest example of its use would be tools/llvm-as/llvm-as.cpp.
Cheers.
Tim.
More information about the llvm-dev
mailing list