Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Qir/Runtime/lib/QIR/bridge-rt.ll
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ declare void @llvm.va_end(i8*)
declare i8* @quantum__rt__tuple_create(i64)
declare void @quantum__rt__tuple_update_reference_count(i8*, i32)
declare void @quantum__rt__tuple_update_alias_count(i8*, i32)
declare i8* @quantum__rt__tuple_copy(i8*, i1)

declare void @quantum__rt__callable_update_reference_count(%"struct.QirCallable"*, i32)
declare %"struct.QirCallable"* @quantum__rt__callable_create(void (i8*, i8*, i8*)**, void (i8*, i64)**, i8*)
Expand Down Expand Up @@ -341,6 +342,13 @@ define dllexport void @__quantum__rt__tuple_update_alias_count(%Tuple* %.th, i32
ret void
}

define dllexport %Tuple* @__quantum__rt__tuple_copy(%Tuple* %.th, i1 %force) {
%th = bitcast %Tuple* %.th to i8*
%th2 = call i8* @quantum__rt__tuple_copy(i8* %th, i1 %force)
%.th2 = bitcast i8* %th2 to %Tuple*
ret %Tuple* %.th2
}

;------------------------------------------------------------------------------
; callables bridge
;
Expand Down