@@ -381,8 +381,8 @@ bool IRForTarget::CreateResultVariable(llvm::Function &llvm_function) {
381
381
382
382
Constant *initializer = result_global->getInitializer ();
383
383
384
- StoreInst *synthesized_store =
385
- new StoreInst ( initializer, new_result_global, first_entry_instruction);
384
+ StoreInst *synthesized_store = new StoreInst (
385
+ initializer, new_result_global, first_entry_instruction-> getIterator () );
386
386
387
387
LLDB_LOG (log , " Synthesized result store \" {0}\"\n " ,
388
388
PrintValue (synthesized_store));
@@ -416,9 +416,8 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
416
416
" CFStringCreateWithBytes" );
417
417
418
418
bool missing_weak = false ;
419
- CFStringCreateWithBytes_addr =
420
- m_execution_unit.FindSymbol (g_CFStringCreateWithBytes_str,
421
- missing_weak);
419
+ CFStringCreateWithBytes_addr = m_execution_unit.FindSymbol (
420
+ g_CFStringCreateWithBytes_str, missing_weak);
422
421
if (CFStringCreateWithBytes_addr == LLDB_INVALID_ADDRESS || missing_weak) {
423
422
LLDB_LOG (log , " Couldn't find CFStringCreateWithBytes in the target" );
424
423
@@ -517,7 +516,8 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
517
516
m_CFStringCreateWithBytes, CFSCWB_arguments,
518
517
" CFStringCreateWithBytes" ,
519
518
llvm::cast<Instruction>(
520
- m_entry_instruction_finder.GetValue (function)));
519
+ m_entry_instruction_finder.GetValue (function))
520
+ ->getIterator ());
521
521
});
522
522
523
523
if (!UnfoldConstant (ns_str, nullptr , CFSCWB_Caller, m_entry_instruction_finder,
@@ -824,7 +824,7 @@ bool IRForTarget::RewriteObjCSelector(Instruction *selector_load) {
824
824
825
825
CallInst *srN_call =
826
826
CallInst::Create (m_sel_registerName, _objc_meth_var_name_,
827
- " sel_registerName" , selector_load);
827
+ " sel_registerName" , selector_load-> getIterator () );
828
828
829
829
// Replace the load with the call in all users
830
830
@@ -917,8 +917,9 @@ bool IRForTarget::RewritePersistentAlloc(llvm::Instruction *persistent_alloc) {
917
917
// Now, since the variable is a pointer variable, we will drop in a load of
918
918
// that pointer variable.
919
919
920
- LoadInst *persistent_load = new LoadInst (persistent_global->getValueType (),
921
- persistent_global, " " , alloc);
920
+ LoadInst *persistent_load =
921
+ new LoadInst (persistent_global->getValueType (), persistent_global, " " ,
922
+ alloc->getIterator ());
922
923
923
924
LLDB_LOG (log , " Replacing \" {0}\" with \" {1}\" " , PrintValue (alloc),
924
925
PrintValue (persistent_load));
@@ -1344,8 +1345,10 @@ bool IRForTarget::UnfoldConstant(Constant *old_constant,
1344
1345
1345
1346
return new BitCastInst (
1346
1347
value_maker.GetValue (function), constant_expr->getType (),
1347
- " " , llvm::cast<Instruction>(
1348
- entry_instruction_finder.GetValue (function)));
1348
+ " " ,
1349
+ llvm::cast<Instruction>(
1350
+ entry_instruction_finder.GetValue (function))
1351
+ ->getIterator ());
1349
1352
});
1350
1353
1351
1354
if (!UnfoldConstant (constant_expr, llvm_function, bit_cast_maker,
@@ -1379,7 +1382,8 @@ bool IRForTarget::UnfoldConstant(Constant *old_constant,
1379
1382
return GetElementPtrInst::Create (
1380
1383
gep->getSourceElementType (), ptr, indices, " " ,
1381
1384
llvm::cast<Instruction>(
1382
- entry_instruction_finder.GetValue (function)));
1385
+ entry_instruction_finder.GetValue (function))
1386
+ ->getIterator ());
1383
1387
});
1384
1388
1385
1389
if (!UnfoldConstant (constant_expr, llvm_function,
@@ -1559,12 +1563,14 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) {
1559
1563
Type *int8Ty = Type::getInt8Ty (function->getContext ());
1560
1564
ConstantInt *offset_int (
1561
1565
ConstantInt::get (offset_type, offset, true ));
1562
- GetElementPtrInst *get_element_ptr = GetElementPtrInst::Create (
1563
- int8Ty, argument, offset_int, " " , entry_instruction);
1566
+ GetElementPtrInst *get_element_ptr =
1567
+ GetElementPtrInst::Create (int8Ty, argument, offset_int, " " ,
1568
+ entry_instruction->getIterator ());
1564
1569
1565
1570
if (name == m_result_name && !m_result_is_pointer) {
1566
- LoadInst *load = new LoadInst (value->getType (), get_element_ptr,
1567
- " " , entry_instruction);
1571
+ LoadInst *load =
1572
+ new LoadInst (value->getType (), get_element_ptr, " " ,
1573
+ entry_instruction->getIterator ());
1568
1574
1569
1575
return load;
1570
1576
} else {
0 commit comments