Skip to content

Commit

Permalink
Provide lower level access to the LLVM IR builder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dotdash committed Jul 21, 2013
1 parent 3cccdbd commit 565a9bf
Show file tree
Hide file tree
Showing 6 changed files with 1,149 additions and 568 deletions.
1 change: 1 addition & 0 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use middle::trans::_match;
use middle::trans::adt;
use middle::trans::base;
use middle::trans::build::*;
use middle::trans::builder::noname;
use middle::trans::callee;
use middle::trans::common::*;
use middle::trans::consts;
Expand Down
Loading

0 comments on commit 565a9bf

Please sign in to comment.