search for: createbasictype

Displaying 10 results from an estimated 10 matches for "createbasictype".

2009 Sep 23
2
[LLVMdev] DebugFactory
...     getSize(type)); >>> } >> >> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what >> you're looking for? >> > That will work. Now all I need is for the methods of DIFactory to take a > Constant* instead of uint64. ok. Feel free to add /// CreateBasicType - Create a basic type like int, float, etc. DIBasicType CreateBasicType(DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits,...
2011 Mar 29
1
[LLVMdev] Accessing metadata & creating DIVariable
...R . Instead of recreating it, using filename and directory I knew out >>> of band */ >> >> DIBuilder.createCompileUnit() does not return anything. >> >>> file= di.createFile >> >> You don't need CU here. >> >>> >>> type= di.createBasicType   //long >> >> same, you don't need CU here. > > If I don't have a di.createCompileUnit.  di.createFile fails with this message. > > DIBuilder.cpp:59: llvm::DIFile > llvm::DIBuilder::createFile(llvm::StringRef, llvm::StringRef): > Assertion `TheCU && &q...
2011 Mar 28
3
[LLVMdev] Accessing metadata & creating DIVariable
Hi, I am wondering if someone can guide me in adding metadata to IR which already contains some metadata. I am trying to add dbg.declare inst for a local variable I added to a function. I used the DIBuilder to build a DIVariable. When I try to compile llc fails with following message. llc: MCAsmStreamer.cpp:273: virtual void<unnamed>::MCAsmStreamer::EmitLabel(llvm::MCSymbol*): Assertion
2009 Sep 23
0
[LLVMdev] DebugFactory
On Wed, Sep 23, 2009 at 1:51 PM, Dan Gohman <gohman at apple.com> wrote: > > On Sep 22, 2009, at 4:49 PM, Talin wrote: > >> >> // Calculate the size of the specified LLVM type. >> Constant * DebugInfoBuilder::getSize(const Type * type) { >> Constant * one = ConstantInt::get(Type::Int32Ty, 1); >> return ConstantExpr::getPtrToInt( >>
2011 Mar 29
0
[LLVMdev] Accessing metadata & creating DIVariable
...and directory I knew out >>>> of band */ >>> >>> DIBuilder.createCompileUnit() does not return anything. >>> >>>> file= di.createFile >>> >>> You don't need CU here. >>> >>>> >>>> type= di.createBasicType //long >>> >>> same, you don't need CU here. >> >> If I don't have a di.createCompileUnit. di.createFile fails with this message. >> >> DIBuilder.cpp:59: llvm::DIFile >> llvm::DIBuilder::createFile(llvm::StringRef, llvm::StringRef): >...
2009 Sep 23
2
[LLVMdev] DebugFactory
On Sep 22, 2009, at 4:49 PM, Talin wrote: > > // Calculate the size of the specified LLVM type. > Constant * DebugInfoBuilder::getSize(const Type * type) { > Constant * one = ConstantInt::get(Type::Int32Ty, 1); > return ConstantExpr::getPtrToInt( > ConstantExpr::getGetElementPtr( > ConstantPointerNull::get(PointerType::getUnqual(type)), >
2009 Oct 02
0
[LLVMdev] DebugFactory
...t;> > >> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what > >> you're looking for? > >> > > That will work. Now all I need is for the methods of DIFactory to take a > > Constant* instead of uint64. > > ok. Feel free to add > /// CreateBasicType - Create a basic type like int, float, etc. > DIBasicType CreateBasicType(DIDescriptor Context, const std::string > &Name, > DICompileUnit CompileUnit, unsigned > LineNumber, > uint64_t SizeInBits, uint64_t AlignInB...
2011 Mar 29
2
[LLVMdev] Accessing metadata & creating DIVariable
Hi, > You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call di.createBasicType(..) and it will work. Actually it doesn't. But if I call di.createCompileUnit(file, dir, producer, ...) with file or dir different from that of CU already in the file, then it works. It isn't sufficient if the producer is different. That fixes my problem, so many thanks. If DIBuiler con...
2011 Mar 29
0
[LLVMdev] Accessing metadata & creating DIVariable
On Mar 29, 2011, at 11:18 AM, Vedavyas Duggirala wrote: > Hi, > >> You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call di.createBasicType(..) and it will work. > > Actually it doesn't. But if I call di.createCompileUnit(file, dir, > producer, ...) with file or dir different from that of CU already in > the file, then it works. It isn't sufficient if the producer is > different. That fixes my problem, so many...
2011 Mar 29
2
[LLVMdev] Accessing metadata & creating DIVariable
...iler::.createCompileUnit. This leads to "duplicate symbol" error from llc. >>> You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call di.createBasicType(..) and it will work. >> >> Actually it doesn't. But if I call di.createCompileUnit(file, dir, >> producer, ...) with file or dir different from that of  CU already in >> the file, then it works. It isn't sufficient if the producer is >> different. That fixes m...