Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions src/Qir/Runtime/lib/QIR/bridge-rt.ll
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ declare %"struct.QirString"* @quantum__rt__result_to_string(%class.RESULT*)
declare %"struct.QirString"* @quantum__rt__pauli_to_string(%PauliId)
declare %"struct.QirString"* @quantum__rt__qubit_to_string(%class.QUBIT*)
declare %"struct.QirString"* @quantum__rt__range_to_string(%"struct.QirRange"* dereferenceable(24) %range)
declare i8* @quantum__rt_string_get_data(%"struct.QirString"* %str)
declare i32 @quantum__rt_string_get_length(%"struct.QirString"* %str)
declare i8* @quantum__rt__string_get_data(%"struct.QirString"* %str)
declare i32 @quantum__rt__string_get_length(%"struct.QirString"* %str)


;------------------------------------------------------------------------------
Expand Down Expand Up @@ -490,15 +490,15 @@ define dllexport %String* @__quantum__rt__range_to_string(%Range %.range) {
ret %String* %.str
}

define dllexport i8* @__quantum__rt_string_get_data(%String* %.str) {
define dllexport i8* @__quantum__rt__string_get_data(%String* %.str) {
%str = bitcast %String* %.str to %"struct.QirString"*
%result = call i8* @quantum__rt_string_get_data(%"struct.QirString"* %str)
%result = call i8* @quantum__rt__string_get_data(%"struct.QirString"* %str)
ret i8* %result
}

define dllexport i32 @__quantum__rt_string_get_length(%String* %.str) {
define dllexport i32 @__quantum__rt__string_get_length(%String* %.str) {
%str = bitcast %String* %.str to %"struct.QirString"*
%result = call i32 @quantum__rt_string_get_length(%"struct.QirString"* %str)
%result = call i32 @quantum__rt__string_get_length(%"struct.QirString"* %str)
ret i32 %result
}

Expand Down
4 changes: 2 additions & 2 deletions src/Qir/Runtime/lib/QIR/strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ extern "C"
return quantum__rt__string_create(oss.str().c_str());
}

const char* quantum__rt_string_get_data(QirString* str) // NOLINT
const char* quantum__rt__string_get_data(QirString* str) // NOLINT
{
return str->str.c_str();
}

uint32_t quantum__rt_string_get_length(QirString* str) // NOLINT
uint32_t quantum__rt__string_get_length(QirString* str) // NOLINT
{
return str->str.size();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Qir/Runtime/public/QirRuntime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ extern "C"

// Returns a pointer to an array that contains a null-terminated sequence of characters
// (i.e., a C-string) representing the current value of the string object.
QIR_SHARED_API const char* quantum__rt_string_get_data(QirString* str); // NOLINT
QIR_SHARED_API const char* quantum__rt__string_get_data(QirString* str); // NOLINT

// Returns the length of the string, in terms of bytes.
// http://www.cplusplus.com/reference/string/string/size/
QIR_SHARED_API uint32_t quantum__rt_string_get_length(QirString* str); // NOLINT
QIR_SHARED_API uint32_t quantum__rt__string_get_length(QirString* str); // NOLINT

// Returns a string representation of the big integer.
// TODO QIR_SHARED_API QirString* quantum__rt__bigint_to_string(QirBigInt*); // NOLINT
Expand Down