[llvm] r208159 - 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

David Blaikie dblaikie at gmail.com
Tue May 6 23:08:29 PDT 2014


Author: dblaikie
Date: Wed May  7 01:08:28 2014
New Revision: 208159

URL: http://llvm.org/viewvc/llvm-project?rev=208159&view=rev
Log:
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).

Modified:
    llvm/trunk/lib/IR/DIBuilder.cpp

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=208159&r1=208158&r2=208159&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Wed May  7 01:08:28 2014
@@ -1159,7 +1159,6 @@ DISubprogram DIBuilder::createMethod(DID
   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(DID
     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)
   };





More information about the llvm-commits mailing list