[llvm] r218820 - DIBuilder: Remove dead code

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Oct 1 14:14:20 PDT 2014


Author: dexonsmith
Date: Wed Oct  1 16:14:20 2014
New Revision: 218820

URL: http://llvm.org/viewvc/llvm-project?rev=218820&view=rev
Log:
DIBuilder: Remove dead code

I neglected to update `DIBuilder::createPieceExpression()` in r218797,
which I noticed while rebasing a patch for PR17891.  On closer
inspection, it looks like dead code.

If there are any downstream users of this, you should transition to the
more general `createExpression()`.  Or, we can add this back, but then
it should just forward to `createExpression()`.

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

Modified: llvm/trunk/include/llvm/IR/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=218820&r1=218819&r2=218820&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/DIBuilder.h Wed Oct  1 16:14:20 2014
@@ -505,14 +505,6 @@ namespace llvm {
     /// @param Addr        An array of complex address operations.
     DIExpression createExpression(ArrayRef<int64_t> Addr = None);
 
-    /// createPieceExpression - Create a descriptor to describe one part
-    /// of aggregate variable that is fragmented across multiple Values.
-    ///
-    /// @param OffsetInBytes Offset of the piece in bytes.
-    /// @param SizeInBytes   Size of the piece in bytes.
-    DIExpression createPieceExpression(unsigned OffsetInBytes,
-                                       unsigned SizeInBytes);
-
     /// createFunction - Create a new descriptor for the specified subprogram.
     /// See comments in DISubprogram for descriptions of these fields.
     /// @param Scope         Function scope.

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=218820&r1=218819&r2=218820&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Wed Oct  1 16:14:20 2014
@@ -1056,20 +1056,6 @@ DIExpression DIBuilder::createExpression
   return DIExpression(MDNode::get(VMContext, Elts));
 }
 
-/// createVariablePiece - Create a descriptor to describe one part
-/// of aggregate variable that is fragmented across multiple Values.
-DIExpression DIBuilder::createPieceExpression(unsigned OffsetInBytes,
-                                              unsigned SizeInBytes) {
-  assert(SizeInBytes > 0 && "zero-size piece");
-  Value *Addr[] = {
-      GetTagConstant(VMContext, DW_TAG_expression),
-      ConstantInt::get(Type::getInt64Ty(VMContext), dwarf::DW_OP_piece),
-      ConstantInt::get(Type::getInt64Ty(VMContext), OffsetInBytes),
-      ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBytes)};
-
-  return DIExpression(MDNode::get(VMContext, Addr));
-}
-
 /// 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.





More information about the llvm-commits mailing list