search for: chaitra

Displaying 4 results from an estimated 4 matches for "chaitra".

2020 Oct 01
3
Creating a global variable for a struct array
...bInit = ConstantArray::get(htabTy, makeArrayRef(htabInitArr,2)); GlobalVariable *htabConst = new GlobalVariable(M, htabInit->getType(), false, GlobalVariable::ExternalLinkage, htabInit, "htab"); Here is the error message: opt: /home/chaitra/llvm-5-src/lib/IR/Constants.cpp:879: llvm::ConstantAggregate::ConstantAggregate(llvm::CompositeType*, llvm::Value::ValueTy, llvm::ArrayRef<llvm::Constant*>): Assertion `V[I]->getType() == T->getTypeAtIndex(I) && "Initializer for composite element doesn't match!"...
2020 Oct 01
2
Creating a global variable for a struct array
...1[10] = {{"myfile.txt", static_lst}, ... }; Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the field dlist* llist in h1. But this results in an LLVM ERROR: Type mismatch in constant table!. How do I fix this error ? Thanks, Chaitra ________________________________ From: Tim Northover <t.p.northover at gmail.com> Sent: Wednesday, September 30, 2020 4:09 AM To: Niddodi, Chaitra <chaitra at illinois.edu> Cc: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Creating a global varia...
2020 Sep 30
2
Creating a global variable for a struct array
...truct array h1 as follows: dhash h1[10]; I want to get a Constant* to variable h1. It looks like I can use ConstantStruct::get(StructType*, ArrayRef<Constant *>) to do this. My question is how to get the second argument of type ArrayRef<Constant *> from the above variable h1. Thanks, Chaitra ________________________________ From: Tim Northover <t.p.northover at gmail.com> Sent: Wednesday, September 23, 2020 03:04 To: Niddodi, Chaitra Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Creating a global variable for a struct array On Tue, 22 Sep 2020 at 23:52, Niddodi, Chaitra...
2020 Sep 22
2
Creating a global variable for a struct array
...r in struct dlist Is there an example that I can refer to for doing this ? I tried to create a GlobalVariable using ConstantStruct::get(StructType*, ArrayRef<Constant *>). I'm not sure how to get the second argument of type ArrayRef<Constant *> from the above variable h1. Thanks, Chaitra -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200922/ff31f363/attachment-0001.html>