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`.
llvm-svn: 235069
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index 46e376a..8b4c5db 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -947,15 +947,15 @@
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());
}