Skip to content

Commit d5c8d3c

Browse files
committed
LLVMCodeBuilder: Fix string initialization in tests
1 parent 3f276ef commit d5c8d3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/llvm/llvmcodebuilder_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ class LLVMCodeBuilderTest : public testing::Test
284284
memcpy(result->data, string1->data, string1->size * sizeof(typeof(*string1->data)));
285285
memcpy(result->data + string1->size, string2->data, (string2->size + 1) * sizeof(typeof(*string2->data))); // +1: null-terminate
286286

287-
ValueData data;
288-
value_assign_stringPtr(&data, result);
289-
return Value(data);
287+
Value ret;
288+
value_assign_stringPtr(&ret.data(), result);
289+
return ret;
290290
}
291291

292292
case OpType::StringChar: {
@@ -300,9 +300,9 @@ class LLVMCodeBuilderTest : public testing::Test
300300
result->data[1] = u'\0';
301301
result->size = inRange;
302302

303-
ValueData data;
304-
value_assign_stringPtr(&data, result);
305-
return Value(data);
303+
Value ret;
304+
value_assign_stringPtr(&ret.data(), result);
305+
return ret;
306306
}
307307

308308
default:

0 commit comments

Comments
 (0)