Mercurial > projects > ldc
diff gen/irstate.cpp @ 1529:ad7f2f1862d6
Adjust LDC to work with the LLVMContext LLVM changes.
This means we now require a fairly new LLVM revision. I use 75234.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 10 Jul 2009 21:30:02 +0200 |
parents | f99a3b393c03 |
children | 61f12f4651b5 |
line wrap: on
line diff
--- a/gen/irstate.cpp Thu Jul 09 21:13:19 2009 +0100 +++ b/gen/irstate.cpp Fri Jul 10 21:30:02 2009 +0200 @@ -22,15 +22,23 @@ ////////////////////////////////////////////////////////////////////////////////////////// IRScope::IRScope() + : builder(llvm::getGlobalContext()) { begin = end = NULL; } IRScope::IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e) + : builder(b) { begin = b; end = e; - builder.SetInsertPoint(b); +} + +const IRScope& IRScope::operator=(const IRScope& rhs) +{ + begin = rhs.begin; + end = rhs.end; + builder.SetInsertPoint(begin); } //////////////////////////////////////////////////////////////////////////////////////////