mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Debug Info: In DIBuilder, the context field of subprogram is updated to use
DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1040,6 +1040,28 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope,
|
||||
return DIVariable(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
/// createFunction - Create a new descriptor for the specified function.
|
||||
/// FIXME: this is added for dragonegg. Once we update dragonegg
|
||||
/// to call resolve function, this will be removed.
|
||||
DISubprogram DIBuilder::createFunction(DIScopeRef Context,
|
||||
StringRef Name,
|
||||
StringRef LinkageName,
|
||||
DIFile File, unsigned LineNo,
|
||||
DICompositeType Ty,
|
||||
bool isLocalToUnit, bool isDefinition,
|
||||
unsigned ScopeLine,
|
||||
unsigned Flags, bool isOptimized,
|
||||
Function *Fn,
|
||||
MDNode *TParams,
|
||||
MDNode *Decl) {
|
||||
// dragonegg does not generate identifier for types, so using an empty map
|
||||
// to resolve the context should be fine.
|
||||
DITypeIdentifierMap EmptyMap;
|
||||
return createFunction(Context.resolve(EmptyMap), Name, LinkageName, File,
|
||||
LineNo, Ty, isLocalToUnit, isDefinition, ScopeLine,
|
||||
Flags, isOptimized, Fn, TParams, Decl);
|
||||
}
|
||||
|
||||
/// createFunction - Create a new descriptor for the specified function.
|
||||
DISubprogram DIBuilder::createFunction(DIDescriptor Context,
|
||||
StringRef Name,
|
||||
@ -1058,7 +1080,7 @@ DISubprogram DIBuilder::createFunction(DIDescriptor Context,
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
||||
File.getFileNode(),
|
||||
getNonCompileUnitScope(Context),
|
||||
DIScope(getNonCompileUnitScope(Context)).getRef(),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, LinkageName),
|
||||
@ -1107,7 +1129,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context,
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
||||
F.getFileNode(),
|
||||
getNonCompileUnitScope(Context),
|
||||
DIScope(getNonCompileUnitScope(Context)).getRef(),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, LinkageName),
|
||||
|
Reference in New Issue
Block a user