OSDN Git Service

DebugInfo: Drop dead code for loose DIDescriptor construction API
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 00:09:47 +0000 (00:09 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 00:09:47 +0000 (00:09 +0000)
commite98edd267cc246fefe697bc22cf61afbb65f9649
tree12b524c488b1dbe0f1f2af2aee5a01bee9ed4e74
parent894f455f8af6c861601b475ce1d50a844d997fe8
DebugInfo: Drop dead code for loose DIDescriptor construction API

Delete `DIDescriptor::is*()` and the various constructors from `MDNode*`
in `DIDescriptor` subclasses.

If this just broke your out-of-tree code, you need to make updates along
the lines of r234255, r234256, r234257 and r234258:

  - Generally, `DIX().isX()` => `isa<MDX>()`.  So, `D.isCompileUnit()`
    should just be `isa<MDCompileUnit>(D)`, modulo checks for null.
      - Exception: `DILexicalBlock` => `MDLexicalBlockBase`.
      - Exception: `DIDerivedType` => `MDDerivedTypeBase`.
      - Exception: `DICompositeType` => `MDCompositeTypeBase`.
      - Exception: `DIVariable` => `MDLocalVariable`.
  - Note that (e.g.) `DICompileUnit` has an implicit constructor from
    `MDCompileUnit*`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234263 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfo.h