From 8b7ca10d4fd322346a6655c9a3773a15bb607c15 Mon Sep 17 00:00:00 2001 From: Serkan Muhcu Date: Tue, 11 Mar 2025 11:55:44 +0100 Subject: [PATCH] Add function attributes to extern functions --- libraries/llvm/forward-declare-c.ll | 64 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/libraries/llvm/forward-declare-c.ll b/libraries/llvm/forward-declare-c.ll index 916ea1384..77b2e2b76 100644 --- a/libraries/llvm/forward-declare-c.ll +++ b/libraries/llvm/forward-declare-c.ll @@ -1,45 +1,45 @@ ; forward-declared from primitives.c -declare i64 @c_get_argc() -declare %Pos @c_get_arg(i64) +declare i64 @c_get_argc() mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable +declare %Pos @c_get_arg(i64) nofree nounwind sspstrong uwtable -declare void @c_io_println_Boolean(%Pos) -declare void @c_io_println_Int(%Int) -declare void @c_io_println_Double(%Double) -declare void @c_io_println_String(%Pos) +declare void @c_io_println_Boolean(%Pos) nofree nounwind sspstrong uwtable +declare void @c_io_println_Int(%Int) nofree nounwind sspstrong uwtable +declare void @c_io_println_Double(%Double) nofree nounwind sspstrong uwtable +declare void @c_io_println_String(%Pos) nounwind sspstrong uwtable -declare void @hole() -declare void @duplicated_prompt() +declare void @hole() noreturn nounwind sspstrong uwtable +declare void @duplicated_prompt() noreturn nounwind sspstrong uwtable -declare %Pos @c_ref_fresh(%Pos) -declare %Pos @c_ref_get(%Pos) -declare %Pos @c_ref_set(%Pos, %Pos) +declare %Pos @c_ref_fresh(%Pos) mustprogress nofree nounwind sspstrong willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable +declare %Pos @c_ref_get(%Pos) nounwind sspstrong uwtable +declare %Pos @c_ref_set(%Pos, %Pos) nounwind sspstrong uwtable -declare %Pos @c_array_new(%Int) -declare %Int @c_array_size(%Pos) -declare %Pos @c_array_get(%Pos, %Int) -declare %Pos @c_array_set(%Pos, %Int, %Pos) +declare %Pos @c_array_new(%Int) mustprogress nofree nounwind sspstrong willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable +declare %Int @c_array_size(%Pos) nounwind sspstrong uwtable +declare %Pos @c_array_get(%Pos, %Int) nounwind sspstrong uwtable +declare %Pos @c_array_set(%Pos, %Int, %Pos) nounwind sspstrong uwtable -declare %Pos @c_bytearray_new(%Int) -declare %Int @c_bytearray_size(%Pos) -declare %Byte @c_bytearray_get(%Pos, %Int) -declare %Pos @c_bytearray_set(%Pos, %Int, %Byte) +declare %Pos @c_bytearray_new(%Int) mustprogress nofree nounwind sspstrong willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable +declare %Int @c_bytearray_size(%Pos) nounwind sspstrong uwtable +declare %Byte @c_bytearray_get(%Pos, %Int) nounwind sspstrong uwtable +declare %Pos @c_bytearray_set(%Pos, %Int, %Byte) nounwind sspstrong uwtable -declare ptr @c_bytearray_data(%Pos) -declare %Pos @c_bytearray_construct(i64, ptr) +declare ptr @c_bytearray_data(%Pos) mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(none) uwtable +declare %Pos @c_bytearray_construct(i64, ptr) mustprogress nofree nounwind sspstrong willreturn uwtable -declare %Pos @c_bytearray_from_nullterminated_string(ptr) -declare ptr @c_bytearray_into_nullterminated_string(%Pos) +declare %Pos @c_bytearray_from_nullterminated_string(ptr) nofree nounwind sspstrong uwtable +declare ptr @c_bytearray_into_nullterminated_string(%Pos) mustprogress nofree nounwind sspstrong willreturn uwtable -declare %Pos @c_bytearray_show_Int(i64) -declare %Pos @c_bytearray_show_Char(i32) -declare %Pos @c_bytearray_show_Byte(i8) -declare %Pos @c_bytearray_show_Double(double) +declare %Pos @c_bytearray_show_Int(i64) nofree nounwind sspstrong uwtable +declare %Pos @c_bytearray_show_Char(i32) nofree nounwind sspstrong memory(readwrite, argmem: none) uwtable +declare %Pos @c_bytearray_show_Byte(i8) nofree nounwind sspstrong uwtable +declare %Pos @c_bytearray_show_Double(double) nofree nounwind sspstrong uwtable -declare %Pos @c_bytearray_concatenate(%Pos, %Pos) -declare %Pos @c_bytearray_equal(%Pos, %Pos) -declare %Int @c_bytearray_compare(%Pos, %Pos) +declare %Pos @c_bytearray_concatenate(%Pos, %Pos) nounwind sspstrong uwtable +declare %Pos @c_bytearray_equal(%Pos, %Pos) nounwind sspstrong uwtable +declare %Int @c_bytearray_compare(%Pos, %Pos) nounwind sspstrong uwtable -declare %Pos @c_bytearray_substring(%Pos, i64, i64) -declare %Int @c_bytearray_character_at(%Pos, i64) +declare %Pos @c_bytearray_substring(%Pos, i64, i64) nounwind sspstrong uwtable +declare %Int @c_bytearray_character_at(%Pos, i64) nounwind sspstrong uwtable