diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-20 00:01:43 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-20 00:01:43 +0000 |
commit | fed199a75859a176a22e4135980a1a497b64e628 (patch) | |
tree | 28f0d754ef17b6a0eaa6db860f2865b37b25a800 /llvm/lib/Transforms | |
parent | d5ac1ab65d4c305cfbf107f2dedfdd94474ffa37 (diff) | |
download | bcm5719-llvm-fed199a75859a176a22e4135980a1a497b64e628.tar.gz bcm5719-llvm-fed199a75859a176a22e4135980a1a497b64e628.zip |
IR: Introduce GenericDwarfNode
As part of PR22235, introduce `DwarfNode` and `GenericDwarfNode`. The
former is a metadata node with a DWARF tag. The latter matches our
current (generic) schema of a header with string (and stringified
integer) data and an arbitrary number of operands.
This doesn't move it into place yet; that change will require a large
number of testcase updates.
llvm-svn: 226529
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index 20ce27823fb..cba4677a2b0 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -192,6 +192,14 @@ static TempMDLocation cloneMDLocation(const MDLocation *Node) { Node->getInlinedAt()); } +static TempGenericDwarfNode +cloneGenericDwarfNode(const GenericDwarfNode *Node) { + SmallVector<Metadata *, 4> DwarfOps; + DwarfOps.append(Node->dwarf_op_begin(), Node->dwarf_op_end()); + return GenericDwarfNode::getTemporary(Node->getContext(), Node->getTag(), + Node->getHeader(), DwarfOps); +} + static TempMDNode cloneMDNode(const MDNode *Node) { switch (Node->getMetadataID()) { default: |