comparison 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
comparison
equal deleted inserted replaced
1528:15f1707721fa 1529:ad7f2f1862d6
20 const llvm::TargetData* gTargetData = 0; 20 const llvm::TargetData* gTargetData = 0;
21 TargetABI* gABI = 0; 21 TargetABI* gABI = 0;
22 22
23 ////////////////////////////////////////////////////////////////////////////////////////// 23 //////////////////////////////////////////////////////////////////////////////////////////
24 IRScope::IRScope() 24 IRScope::IRScope()
25 : builder(llvm::getGlobalContext())
25 { 26 {
26 begin = end = NULL; 27 begin = end = NULL;
27 } 28 }
28 29
29 IRScope::IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e) 30 IRScope::IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e)
31 : builder(b)
30 { 32 {
31 begin = b; 33 begin = b;
32 end = e; 34 end = e;
33 builder.SetInsertPoint(b); 35 }
36
37 const IRScope& IRScope::operator=(const IRScope& rhs)
38 {
39 begin = rhs.begin;
40 end = rhs.end;
41 builder.SetInsertPoint(begin);
34 } 42 }
35 43
36 ////////////////////////////////////////////////////////////////////////////////////////// 44 //////////////////////////////////////////////////////////////////////////////////////////
37 IRTargetScope::IRTargetScope() 45 IRTargetScope::IRTargetScope()
38 { 46 {