Revert "DIBuilder: Remove dead code"
This reverts commit r218820. It turns out that Adrian has an outstanding SROA patch that uses this. I've updated it to forward to `createExpression()`. llvm-svn: 218828
This commit is contained in:
parent
1b42bde30d
commit
9affbbaac0
|
@ -505,6 +505,14 @@ namespace llvm {
|
||||||
/// @param Addr An array of complex address operations.
|
/// @param Addr An array of complex address operations.
|
||||||
DIExpression createExpression(ArrayRef<int64_t> Addr = None);
|
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.
|
/// createFunction - Create a new descriptor for the specified subprogram.
|
||||||
/// See comments in DISubprogram for descriptions of these fields.
|
/// See comments in DISubprogram for descriptions of these fields.
|
||||||
/// @param Scope Function scope.
|
/// @param Scope Function scope.
|
||||||
|
|
|
@ -1056,6 +1056,12 @@ DIExpression DIBuilder::createExpression(ArrayRef<int64_t> Addr) {
|
||||||
return DIExpression(MDNode::get(VMContext, Elts));
|
return DIExpression(MDNode::get(VMContext, Elts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DIExpression DIBuilder::createPieceExpression(unsigned OffsetInBytes,
|
||||||
|
unsigned SizeInBytes) {
|
||||||
|
int64_t Addr[] = {dwarf::DW_OP_piece, OffsetInBytes, SizeInBytes};
|
||||||
|
return createExpression(Addr);
|
||||||
|
}
|
||||||
|
|
||||||
/// createFunction - Create a new descriptor for the specified function.
|
/// createFunction - Create a new descriptor for the specified function.
|
||||||
/// FIXME: this is added for dragonegg. Once we update dragonegg
|
/// FIXME: this is added for dragonegg. Once we update dragonegg
|
||||||
/// to call resolve function, this will be removed.
|
/// to call resolve function, this will be removed.
|
||||||
|
|
Loading…
Reference in New Issue