mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 23:06:05 +00:00
PR19562: DebugInfo temporary MDNode leak: Don't include a temporary node to replace with a variable list for methods, since they're always declarations and thus never include variables
This field is used for a list of variables to ensure they are not lost during optimization (they're only included when optimizations are enabled). llvm-svn: 208159
This commit is contained in:
parent
924221cb37
commit
f248c16f5f
@ -1159,7 +1159,6 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name,
|
|||||||
assert(getNonCompileUnitScope(Context) &&
|
assert(getNonCompileUnitScope(Context) &&
|
||||||
"Methods should have both a Context and a context that isn't "
|
"Methods should have both a Context and a context that isn't "
|
||||||
"the compile unit.");
|
"the compile unit.");
|
||||||
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
|
|
||||||
Value *Elts[] = {
|
Value *Elts[] = {
|
||||||
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
||||||
F.getFileNode(),
|
F.getFileNode(),
|
||||||
@ -1179,7 +1178,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name,
|
|||||||
Fn,
|
Fn,
|
||||||
TParam,
|
TParam,
|
||||||
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
||||||
MDNode::getTemporary(VMContext, TElts),
|
nullptr,
|
||||||
// FIXME: Do we want to use different scope/lines?
|
// FIXME: Do we want to use different scope/lines?
|
||||||
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo)
|
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo)
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user