Use unwrapDIPtr because the Scope may be passed as None

This commit is contained in:
Daniel Frampton 2020-10-27 18:05:16 -07:00
parent 7bade6ef73
commit a3bff69134

View File

@ -765,7 +765,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTypedef(
LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Scope) {
return wrap(Builder->createTypedef(
unwrap<DIType>(Type), StringRef(Name, NameLen), unwrap<DIFile>(File),
LineNo, unwrap<DIScope>(Scope)));
LineNo, unwrapDIPtr<DIScope>(Scope)));
}
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreatePointerType(