DebugInfo: Gut DIDescriptor

PR23080 is almost finished.  With this commit, there's no consequential
API in `DIDescriptor` and its subclasses.  What's left?

  - Default-constructed to `nullptr`.
  - Handy `const_cast<>` (constructed from `const`, but accessors are
    non-`const`).

I think the safe way to catch those is to delete the classes and fix
compile errors.  That'll be my next step, after I delete the `DITypeRef`
(etc.) wrapper around `MDTypeRef`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-16 01:53:33 +00:00
parent 9c1aa1c021
commit b07e129e63
7 changed files with 19 additions and 69 deletions

View File

@ -947,15 +947,15 @@ TEST_F(MDTypeTest, setFlags) {
MDType *D = MDSubroutineType::getDistinct(Context, 0u, Types);
EXPECT_EQ(0u, D->getFlags());
D->setFlags(DIDescriptor::FlagRValueReference);
EXPECT_EQ(DIDescriptor::FlagRValueReference, D->getFlags());
D->setFlags(DebugNode::FlagRValueReference);
EXPECT_EQ(DebugNode::FlagRValueReference, D->getFlags());
D->setFlags(0u);
EXPECT_EQ(0u, D->getFlags());
TempMDType T = MDSubroutineType::getTemporary(Context, 0u, Types);
EXPECT_EQ(0u, T->getFlags());
T->setFlags(DIDescriptor::FlagRValueReference);
EXPECT_EQ(DIDescriptor::FlagRValueReference, T->getFlags());
T->setFlags(DebugNode::FlagRValueReference);
EXPECT_EQ(DebugNode::FlagRValueReference, T->getFlags());
T->setFlags(0u);
EXPECT_EQ(0u, T->getFlags());
}