<div dir="ltr">Thanks, for suggesting me of the replacement of OpaqueType, but I am little confused how to use StructType, I mean I am following the code of this project :<a href="https://llvm.org/svn/llvm-project/java/trunk/lib/Compiler/Resolver.cpp">https://llvm.org/svn/llvm-project/java/trunk/lib/Compiler/Resolver.cpp</a> <div>Here it is used OpaqueType::get() , So according to you I have to first create StrructType like "StructType::create(LLVMContext & Context)" and then use StructType::get() ? Please suggest me how to use of StructType in here? Thanks in advance.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 9:56 PM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 24 Aug 2018 at 04:49, Ratnesh Tiwari via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> 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.<br>
<br>
Oh, that must be some pretty old code! I think OpaqueType was removed<br>
in the type system rewrite around LLVM 3.0. Chris wrote a blog about<br>
the changes at the time:<br>
<a href="http://blog.llvm.org/2011/11/llvm-30-type-system-rewrite.html" rel="noreferrer" target="_blank">http://blog.llvm.org/2011/11/llvm-30-type-system-rewrite.html</a>.<br>
<br>
The replacement for an opaque type is a StructType that hasn't had its<br>
body filled in yet. I.e. what you get back from StructType::create.<br>
<br>
> 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.<br>
<br>
Bytecode went away even earlier in LLVM's history. The replacement is<br>
called bitcode. The header you'll need is<br>
llvm/Bitcode/BitcodeWriter.h, and it's not a pass any more. Possibly<br>
the simplest example of its use would be tools/llvm-as/llvm-as.cpp.<br>
<br>
Cheers.<br>
<br>
Tim.<br>
</blockquote></div>