search for: parameterdefn

Displaying 8 results from an estimated 8 matches for "parameterdefn".

2010 Sep 06
2
[LLVMdev] More DIFactory questions - still stumped
...()); } return sp; } And here's the code that generates function type descriptors: DICompositeType CodeGenerator::genDIFunctionType(const FunctionType * type) { DIDescriptorArray args; args.push_back(genDIType(type->returnType())); if (type->selfParam() != NULL) { const ParameterDefn * param = type->selfParam(); // genDIParameterType() calls genDIType and then makes it a pointer // if the underlying type is a reference type. args.push_back(genDIParameterType(param->type())); } const ParameterList & params = type->params(); for (ParameterList::con...
2010 Sep 07
0
[LLVMdev] More DIFactory questions - still stumped
...rations. I may be doing wrong, though, for multi-file compilation (haven't tested thoroughly). > DICompositeType CodeGenerator::genDIFunctionType(const FunctionType * type) (...) >   for (ParameterList::const_iterator it = params.begin(); it != > params.end(); ++it) { >     const ParameterDefn * param = *it; >     args.push_back(genDIParameterType(param->type())); >   } Don't do that. I know it looks right, but it's broken in DIFactory. >   DICompositeType fnType = dbgFactory_.CreateCompositeType( >       dwarf::DW_TAG_subroutine_type, >       dbgCompileUnit_...
2010 Sep 05
2
[LLVMdev] More DIFactory questions - still stumped
...ents are in fact the bare > types, not the formal parameter declarations. > > Here's what my code looks like: > > const ParameterList & params = type->params(); > for (ParameterList::const_iterator it = params.begin(); it != > params.end(); ++it) { > const ParameterDefn * param = *it; > DIType ptype = genDIParameterType(param->type()); > ptype = dbgFactory_.CreateDerivedTypeEx( > dwarf::DW_TAG_formal_parameter, > dbgCompileUnit_, > param->name() != NULL ? param->name() : "", > genDIFile(p...
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 07
2
[LLVMdev] More DIFactory questions - still stumped
...multi-file compilation (haven't tested thoroughly). > > > > > DICompositeType CodeGenerator::genDIFunctionType(const FunctionType * > type) > (...) > > for (ParameterList::const_iterator it = params.begin(); it != > > params.end(); ++it) { > > const ParameterDefn * param = *it; > > args.push_back(genDIParameterType(param->type())); > > } > > Don't do that. I know it looks right, but it's broken in DIFactory. > > > > DICompositeType fnType = dbgFactory_.CreateCompositeType( > > dwarf::DW_TAG_subrou...
2010 Aug 31
0
[LLVMdev] More DIFactory questions
On Aug 31, 2010, at 9:03 AM, Talin wrote: > 4) What is the meaning of the "inlinedAt" argument for DebugLoc::get()? Does it mean the location where the inlined code was defined, or the location where it was expanded? the location where it was expanded - Devang
2010 Sep 07
0
[LLVMdev] More DIFactory questions - still stumped
...or multi-file compilation (haven't tested thoroughly). > > > > > DICompositeType CodeGenerator::genDIFunctionType(const FunctionType * type) > (...) > > for (ParameterList::const_iterator it = params.begin(); it != > > params.end(); ++it) { > > const ParameterDefn * param = *it; > > args.push_back(genDIParameterType(param->type())); > > } > > Don't do that. I know it looks right, but it's broken in DIFactory. > > > > DICompositeType fnType = dbgFactory_.CreateCompositeType( > > dwarf::DW_TAG_sub...
2010 Aug 31
5
[LLVMdev] More DIFactory questions
Here are some issues that I am unclear about. What would be great is if the answers could be incorporated into the comments and documentation for DIFactory and DebugInfo.h: 1) What types of DIScope are valid arguments for DebugLoc::get()? The method takes an MDNode* argument, so looking at the function signature is no help. For example, DIFile is a subtype of DIScope, however looking at