search for: getorcreatearray

Displaying 17 results from an estimated 17 matches for "getorcreatearray".

2015 Feb 19
4
[LLVMdev] Parameter names in IR and debug info
...ose signature differs only in the names of the formals. Also the function type could be used as the referent of a pointer type, which could then be used as the type of a variable, without any actual function at all. To build corresponding debug info, I must: 6. Build a llvm::DIArray, using llvm::getOrCreateArray, from the results of 4. 7. Build a llvm::DIComposite type for the function, using llvm::createSubroutineType, from the result of 6. 8. Build a llvm::DIFunction using llvm::createFunction, from the result of 7. Here, I need the formal values, with names, first, before building the function type...
2011 Oct 28
0
[LLVMdev] DIBuilder - what's with the null compile units?
...;Value *, 4> Variables; > for (unsigned ii = 0, ee = NMD->getNumOperands(); ii != ee; ++ii) > > It looks as if getFnSpecificMDNode() is always returning NULL in my case - the body of the if statement never gets executed. The two lines above this for loop is DIArray SPs = getOrCreateArray(AllSubprograms); DIType(TempSubprograms).replaceAllUsesWith(SPs); This should populate your CompieUnit's node that holds top level subprograms. - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments...
2010 Nov 07
3
[LLVMdev] Next round of DWARF issues/questions
..., type->typeDefn()->linkageName().c_str(), genDIFile(type->typeDefn()), getSourceLineNumber(type->typeDefn()->location()), getSizeOfInBits(type->irType()), getAlignOfInBits(type->irType()), getInt64Val(0), 0, DIType(), dbgFactory_.GetOrCreateArray(members.data(), members.size())); The 'getSizeOfInBits()' function and the others like it basically call llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking at the generated IR, I can see that the expressions look correct to me (I've added some line breaks for cl...
2010 Nov 08
0
[LLVMdev] Next round of DWARF issues/questions
...kageName().c_str(), > genDIFile(type->typeDefn()), > getSourceLineNumber(type->typeDefn()->location()), > getSizeOfInBits(type->irType()), > getAlignOfInBits(type->irType()), > getInt64Val(0), 0, > DIType(), > dbgFactory_.GetOrCreateArray(members.data(), members.size())); > > The 'getSizeOfInBits()' function and the others like it basically call llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking at the generated IR, I can see that the expressions look correct to me (I've added some line br...
2010 Nov 09
2
[LLVMdev] Next round of DWARF issues/questions
...kageName().c_str(), > genDIFile(type->typeDefn()), > getSourceLineNumber(type->typeDefn()->location()), > getSizeOfInBits(type->irType()), > getAlignOfInBits(type->irType()), > getInt64Val(0), 0, > DIType(), > dbgFactory_.GetOrCreateArray(members.data(), members.size())); > > The 'getSizeOfInBits()' function and the others like it basically call > llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking > at the generated IR, I can see that the expressions look correct to me (I've > added...
2011 Oct 28
3
[LLVMdev] DIBuilder - what's with the null compile units?
On Mon, Oct 24, 2011 at 9:17 AM, Devang Patel <dpatel at apple.com> wrote: > > On Oct 23, 2011, at 12:03 AM, Talin wrote: > > Just a follow up on this - I am still having problems, I never did figure > out a solution. (I've been running with debug off for the last month so that > I could get work done.) > > Here's what I am seeing: I am definitely calling
2010 Nov 09
0
[LLVMdev] Next round of DWARF issues/questions
...genDIFile(type->typeDefn()), >> getSourceLineNumber(type->typeDefn()->location()), >> getSizeOfInBits(type->irType()), >> getAlignOfInBits(type->irType()), >> getInt64Val(0), 0, >> DIType(), >> dbgFactory_.GetOrCreateArray(members.data(), members.size())); >> >> The 'getSizeOfInBits()' function and the others like it basically call llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking at the generated IR, I can see that the expressions look correct to me (I've added some...
2011 Feb 21
1
[LLVMdev] DIFactory
On 21 February 2011 19:35, Devang Patel <dpatel at apple.com> wrote: > If you have patch, go ahead, I am fine with it. I don't, but can produce one. Will look into it tomorrow morning. cheers, --renato
2014 Jul 21
4
[LLVMdev] LTO type uniquing: ODR assertion failure
...gt; > DITypeRefs. >> >> Why can't they? > > > For ArrayType, we create it like this: > SmallVector<llvm::Value *, 8> Subscripts; > ... > Subscripts.push_back(DBuilder.getOrCreateSubrange(0, Count)); > ... > llvm::DIArray SubscriptArray = DBuilder.getOrCreateArray(Subscripts); > > The elements of getTypeArray() are DISubranges, even though the function is > called getTypeArray :) Yeah, that seems pretty bogus. They could use a separate type with its own array handling, perhaps. > >> >> >> > We can fix that by extending DICo...
2015 Jan 19
3
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
> On 2015-Jan-19, at 12:38, Frédéric Riss <friss at apple.com> wrote: > > >> On Jan 19, 2015, at 12:04 PM, Christian Schafmeister <chris.schaf at verizon.net> wrote: >> >> >> I forgot to mention this in my initial email. >> >> The build of LLVM that I was using was commit a0d5d7aed8e177cea381b3d054d80c212ece9f2c >> The date on the
2010 Nov 26
3
[LLVMdev] Next round of DWARF issues/questions
...genDIFile(type->typeDefn()), >> getSourceLineNumber(type->typeDefn()->location()), >> getSizeOfInBits(type->irType()), >> getAlignOfInBits(type->irType()), >> getInt64Val(0), 0, >> DIType(), >> dbgFactory_.GetOrCreateArray(members.data(), members.size())); >> >> The 'getSizeOfInBits()' function and the others like it basically call >> llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking >> at the generated IR, I can see that the expressions look correct to me (I...
2010 Sep 05
0
[LLVMdev] More DIFactory questions - still stumped
On 5 September 2010 19:32, Talin <viridia at gmail.com> wrote: > I've carefully studied the source code of CGDebugInfo in clang as a working > example. One puzzlement is that there's a discrepancy between what the > "source level debugging with LLVM" docs say and what clang does: According > to the docs, DW_TAG_formal_parameter is used to specify a formal
2010 Sep 06
2
[LLVMdev] More DIFactory questions - still stumped
...ype())); } DICompositeType fnType = dbgFactory_.CreateCompositeType( dwarf::DW_TAG_subroutine_type, dbgCompileUnit_, "", dbgFile_, 0, // Source line 0, // Size 0, // Align 0, // Offset 0, // Flags DIType(), dbgFactory_.GetOrCreateArray(args.data(), args.size())); dbgTypeMap_[type] = fnType; DASSERT(fnType.Verify()); return fnType; } I suppose DIFactory was done tailored to C-like languages using Clang > as the primary driver for changes. I'd not be surprised if you could > do things that it didn't expect a...
2014 Jul 21
2
[LLVMdev] LTO type uniquing: ODR assertion failure
On Mon, Jul 21, 2014 at 3:35 PM, Manman Ren <manman.ren at gmail.com> wrote: > > > > On Mon, Jul 21, 2014 at 1:14 PM, David Blaikie <dblaikie at gmail.com> wrote: >> >> On Mon, Jul 21, 2014 at 10:39 AM, Manman Ren <manman.ren at gmail.com> wrote: >> > >> > >> > >> > On Mon, Jul 14, 2014 at 11:32 AM, Manman Ren
2010 Nov 26
0
[LLVMdev] Next round of DWARF issues/questions
...t;typeDefn()), >>> getSourceLineNumber(type->typeDefn()->location()), >>> getSizeOfInBits(type->irType()), >>> getAlignOfInBits(type->irType()), >>> getInt64Val(0), 0, >>> DIType(), >>> dbgFactory_.GetOrCreateArray(members.data(), members.size())); >>> >>> The 'getSizeOfInBits()' function and the others like it basically call >>> llvm::ConstantExpr::getSizeOf() and then multiple the result by 8. Looking >>> at the generated IR, I can see that the expressions look co...
2015 Aug 18
3
[RFC PATCH 1/2] [clang]: Add AuxAttr support
...pe.second) { + std::string key("." + p_attr.first); + std::replace(key.begin(), key.end(), ' ', '.'); + + Enumerators.push_back(DBuilder.createEnumerator(StringRef(key), + p_attr.second)); + } + + llvm::DINodeArray EltArray = DBuilder.getOrCreateArray(Enumerators); + + llvm::DIFile *file = getOrCreateFile(SourceLocation()); + + DBuilder.createEnumerationType( + type == nullptr ? file : getContextDescriptor(type->getAsTagDecl()), + ".llvm.aux.attr", file, 0, 0, 0, + EltArray, nullptr, SmallStrin...
2010 Sep 05
2
[LLVMdev] More DIFactory questions - still stumped
I hate to be a nag, but after several days of working on this I am still utterly stumped. Let me recap the situation as it currently stands: I'm trying to write code that generates DWARF debugging information for my compiler using DIFactory and friends. Unfortunately the information I am generating appears to be invalid, but I can't figure out the cause. Based on the advice in the