From ba26efb60c9e11ab058a1c31b9816147c55ab417 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Thu, 4 Feb 2016 19:40:28 +0200 Subject: Implement filling drop in MIR Hopefully the author caught all the cases. For the mir_dynamic_drops_3 test case the ratio of memsets to other instructions is 12%. On the other hand we actually do not double drop for at least the test cases provided anymore in MIR. --- src/rustllvm/RustWrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rustllvm/RustWrapper.cpp') diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 4ebe49512d7..91cf4aa1da9 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -1167,3 +1167,8 @@ LLVMRustBuildInvoke(LLVMBuilderRef B, return LLVMBuildInvoke(B, Fn, Args, NumArgs, Then, Catch, Name); } #endif + +extern "C" void LLVMRustPositionBuilderAtStart(LLVMBuilderRef B, LLVMBasicBlockRef BB) { + auto point = unwrap(BB)->getFirstInsertionPt(); + unwrap(B)->SetInsertPoint(unwrap(BB), point); +} -- cgit 1.4.1-3-g733a5