From a74feaf1594673bcec77ed45bd4b6766289a25b3 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 5 May 2011 12:45:34 -0700 Subject: rustc: Link with intrinsics.bc; change intrinsics linkage to linkonce_odr --- src/rt/intrinsics/intrinsics.cpp | 3 +++ src/rt/intrinsics/intrinsics.ll.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/rt') diff --git a/src/rt/intrinsics/intrinsics.cpp b/src/rt/intrinsics/intrinsics.cpp index 7c4b5450..b327c0f1 100644 --- a/src/rt/intrinsics/intrinsics.cpp +++ b/src/rt/intrinsics/intrinsics.cpp @@ -1,3 +1,6 @@ +// Use `clang++ -emit-llvm -S -arch i386 -O3 -I../isaac -I../uthash -o +// intrinsics.ll intrinsics.cpp` + #include "../rust_internal.h" extern "C" size_t diff --git a/src/rt/intrinsics/intrinsics.ll.in b/src/rt/intrinsics/intrinsics.ll.in index 2a05555e..ab78bab7 100644 --- a/src/rt/intrinsics/intrinsics.ll.in +++ b/src/rt/intrinsics/intrinsics.ll.in @@ -51,7 +51,7 @@ target triple = "@CFG_LLVM_TRIPLE@" %struct.stk_seg = type { i32, i32, [0 x i8] } %struct.type_desc = type { %struct.type_desc**, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.UT_hash_handle, i32, [0 x %struct.type_desc*] } -define i32 @rust_intrinsic_vec_len(%struct.rust_task* nocapture %task, %struct.type_desc* nocapture %ty, %struct.rust_vec* nocapture %v) nounwind readonly ssp { +define linkonce_odr i32 @rust_intrinsic_vec_len(%struct.rust_task* nocapture %task, %struct.type_desc* nocapture %ty, %struct.rust_vec* nocapture %v) nounwind readonly ssp { entry: %fill = getelementptr inbounds %struct.rust_vec* %v, i32 0, i32 2 %tmp1 = load i32* %fill, align 4, !tbaa !0 -- cgit v1.2.3