diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2016-02-04 19:40:28 +0200 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2016-02-24 21:05:21 +0200 |
| commit | ba26efb60c9e11ab058a1c31b9816147c55ab417 (patch) | |
| tree | 37cfc6ce05c69908fe02a37515185c79a9248d1b /src/rustllvm/RustWrapper.cpp | |
| parent | be7196a793a185355efb7ec8801102ddec95483d (diff) | |
| download | rust-ba26efb60c9e11ab058a1c31b9816147c55ab417.tar.gz rust-ba26efb60c9e11ab058a1c31b9816147c55ab417.zip | |
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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); +} |
