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