Skip to content

Commit 565a9bf

Browse files
committed
Provide lower level access to the LLVM IR builder
Currently, the helper functions in the "build" module can only append at the end of a block. For certain things we'll want to be able to insert code at arbitrary locations inside a block though. Although can we do that by directly calling the LLVM functions, that is rather ugly and means that somethings need to be implemented twice. Once in terms of the helper functions and once in terms of low level LLVM functions. Instead of doing that, we should provide a Builder type that provides low level access to the builder, and which can be used by both, the helper functions in the "build" module, as well larger units of abstractions that combine several LLVM instructions.
1 parent 3cccdbd commit 565a9bf

File tree

6 files changed

+1149
-568
lines changed

6 files changed

+1149
-568
lines changed

src/librustc/middle/trans/base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ use middle::trans::_match;
4141
use middle::trans::adt;
4242
use middle::trans::base;
4343
use middle::trans::build::*;
44+
use middle::trans::builder::noname;
4445
use middle::trans::callee;
4546
use middle::trans::common::*;
4647
use middle::trans::consts;

0 commit comments

Comments
 (0)