1
Fork 0

Use LLVMDIBuilderCreateDebugLocation

The LLVM-C binding takes an explicit context, whereas our binding obtained the
context from the scope argument.
This commit is contained in:
Zalathar 2025-02-01 14:00:20 +11:00
parent 949b4673ce
commit 8ddd9c38f6
3 changed files with 9 additions and 17 deletions

View file

@ -1315,16 +1315,6 @@ extern "C" void LLVMRustDICompositeTypeReplaceArrays(
DINodeArray(unwrap<MDTuple>(Params)));
}
extern "C" LLVMMetadataRef
LLVMRustDIBuilderCreateDebugLocation(unsigned Line, unsigned Column,
LLVMMetadataRef ScopeRef,
LLVMMetadataRef InlinedAt) {
MDNode *Scope = unwrapDIPtr<MDNode>(ScopeRef);
DILocation *Loc = DILocation::get(Scope->getContext(), Line, Column, Scope,
unwrapDIPtr<MDNode>(InlinedAt));
return wrap(Loc);
}
extern "C" LLVMMetadataRef
LLVMRustDILocationCloneWithBaseDiscriminator(LLVMMetadataRef Location,
unsigned BD) {