Good catch! We should probably add to the doxygen comment that this DIType is guaranteed to be valid, after this operation, and that it will wrap a new MDNode or D's MDNode, respectively. http://reviews.llvm.org/D5326