DebugInfo: Use MDTypeRef throughout the hierarchy

Use `MDTypeRef` (etc.) in the new debug info hierarchy rather than raw
`Metadata *` pointers.

I rolled in a change to `DIBuilder` that looks unrelated: take `DIType`
instead of `DITypeRef` as type arguments when creating variables.
However, this was the simplest way to use `MDTypeRef` within the
functions, and didn't require any cleanups from callers in clang (since
they were all passing in `DIType`s anyway, relying on their implicit
conversions to `DITypeRef`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-06 19:03:45 +00:00
parent ebb3c53316
commit e009b6fd92
8 changed files with 206 additions and 186 deletions

View File

@ -257,7 +257,7 @@ DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
void DICompositeType::setContainingType(DICompositeType ContainingType) {
TypedTrackingMDRef<MDCompositeTypeBase> N(get());
N->replaceVTableHolder(ContainingType.getRef());
N->replaceVTableHolder(MDTypeRef::get(ContainingType));
DbgNode = N;
}