IR: Split MDNode into GenericMDNode and MDNodeFwdDecl
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 18 Nov 2014 00:37:17 +0000 (00:37 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 18 Nov 2014 00:37:17 +0000 (00:37 +0000)
commit50846f80acea3d2e2e74d472ae22ddbae0984930
treeea98a752c8216e1abd7fb700f337c9a34d1b0da0
parent94d384e4231e5e1e511873e421fdb63b175d64f0
IR: Split MDNode into GenericMDNode and MDNodeFwdDecl

Split `MDNode` into two classes:

  - `GenericMDNode`, which is uniquable (and for now, always starts
    uniqued).  Once `Metadata` is split from the `Value` hierarchy, this
    class will lose the ability to RAUW itself.

  - `MDNodeFwdDecl`, which is used for the "temporary" interface, is
    never uniqued, and isn't managed by `LLVMContext` at all.

I've left most of the guts in `MDNode` for now, but I'll incrementally
move things to the right places (or delete the functionality, as
appropriate).

Part of PR21532.

llvm-svn: 222205
llvm/include/llvm/IR/Metadata.h
llvm/include/llvm/IR/Value.h
llvm/lib/IR/LLVMContextImpl.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Metadata.cpp