diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-07 06:08:28 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-07 06:08:28 +0000 |
commit | 8a25ee1440ee7ece42851246b788fc839446bceb (patch) | |
tree | 5d5d842e354ba68a1168cfd57614772cc4407c14 | |
parent | a1f8bd6753ca12605337ee3832cb47cfbc42eaac (diff) | |
download | llvm-8a25ee1440ee7ece42851246b788fc839446bceb.tar.gz llvm-8a25ee1440ee7ece42851246b788fc839446bceb.tar.bz2 llvm-8a25ee1440ee7ece42851246b788fc839446bceb.tar.xz |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208159 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/DIBuilder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 528b43cdc8..48edc9a9b5 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -1159,7 +1159,6 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name, assert(getNonCompileUnitScope(Context) && "Methods should have both a Context and a context that isn't " "the compile unit."); - Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) }; Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_subprogram), F.getFileNode(), @@ -1179,7 +1178,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name, Fn, TParam, Constant::getNullValue(Type::getInt32Ty(VMContext)), - MDNode::getTemporary(VMContext, TElts), + nullptr, // FIXME: Do we want to use different scope/lines? ConstantInt::get(Type::getInt32Ty(VMContext), LineNo) }; |