IR: Add missing API to specialized metadata nodes
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 3 Mar 2015 16:45:34 +0000 (16:45 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 3 Mar 2015 16:45:34 +0000 (16:45 +0000)
commit853cd2630e8a2d2d40197702a6d31fb9d6fda274
treec2fff67eba795e631656516854f22cc19529be46
parent68001983008ae9f846081d76abc827286032bb4e
IR: Add missing API to specialized metadata nodes

Add the final bits of API that `DIBuilder` needs before the new nodes
can be moved into place.

  - Add `MDType::clone()` and `MDType::setFlags()` to support
    `DIBuilder::createTypeWithFlags()`.
  - Add `MDBasicType::get()` overload that just requires a tag and a
    name, as a convenience for `DIBuilder::createUnspecifiedType()`.
  - Add `MDLocalVariable::withInline()` and
    `MDLocalVariable::withoutInline()` to support
    `llvm::createInlinedVariable()` and
    `llvm::cleanseInlinedVariable()`.

(Somehow these got lost inside the "move into place" patch I'm about to
commit -- better to commit separately!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231079 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfoMetadata.h
unittests/IR/MetadataTest.cpp