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. 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. Thanks& Regards, Ratnesh Tiwari -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180824/cfeaa1c8/attachment.html>
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.
>> 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.I believe this change was introduced in LLVM 2.0 that was released ... more than 11 years ago ;) -- With best regards, Anton Korobeynikov Department of Statistical Modelling, Saint Petersburg State University
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 : https://llvm.org/svn/llvm-project/java/trunk/lib/Compiler/Resolver.cpp 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. On Fri, Aug 24, 2018 at 9:56 PM Tim Northover <t.p.northover at gmail.com> wrote:> 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. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180825/c1708b63/attachment.html>