From e4743b15b15ea5f1b2611bbc1718274ebb03bf03 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 4 May 2022 16:40:12 +0100 Subject: Add `@(priority_index=)` for `foreign import` --- src/llvm_backend.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/llvm_backend.cpp') diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 267431551..7cf588853 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -43,6 +43,13 @@ GB_COMPARE_PROC(foreign_library_cmp) { if (x == y) { return 0; } + GB_ASSERT(x->kind == Entity_LibraryName); + GB_ASSERT(y->kind == Entity_LibraryName); + + cmp = i64_cmp(x->LibraryName.priority_index, y->LibraryName.priority_index); + if (cmp) { + return cmp; + } if (x->pkg != y->pkg) { isize order_x = x->pkg ? x->pkg->order : 0; -- cgit v1.2.3