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)
commit2c38b004d975cbac18f23286cdf1a48f81738e1a
treec5a1c69af7e281292bf717a6a8cad426d792923d
parent8ce35351f81070f229606cd7020408906d696075
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222205 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Metadata.h
include/llvm/IR/Value.h
lib/IR/LLVMContextImpl.cpp
lib/IR/LLVMContextImpl.h
lib/IR/Metadata.cpp