mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update for llvm r281167: changes to ilist_iterator template arguments.
(cherry picked from commit 97e415ce2a)
This commit is contained in:
@@ -333,6 +333,7 @@ private:
|
||||
friend class ::swift::SILFunction;
|
||||
|
||||
SILFunction *Parent;
|
||||
using block_iterator = simple_ilist<SILBasicBlock>::iterator;
|
||||
|
||||
public:
|
||||
static void deleteNode(SILBasicBlock *BB) { BB->~SILBasicBlock(); }
|
||||
@@ -340,8 +341,7 @@ public:
|
||||
void addNodeToList(SILBasicBlock *BB) {}
|
||||
|
||||
void transferNodesFromList(ilist_traits<SILBasicBlock> &SrcTraits,
|
||||
ilist_iterator<SILBasicBlock> First,
|
||||
ilist_iterator<SILBasicBlock> Last);
|
||||
block_iterator First, block_iterator Last);
|
||||
|
||||
private:
|
||||
static void createNode(const SILBasicBlock &);
|
||||
|
||||
@@ -5537,6 +5537,8 @@ struct ilist_traits<::swift::SILInstruction> :
|
||||
private:
|
||||
swift::SILBasicBlock *getContainingBlock();
|
||||
|
||||
using instr_iterator = simple_ilist<SILInstruction>::iterator;
|
||||
|
||||
public:
|
||||
static void deleteNode(SILInstruction *V) {
|
||||
SILInstruction::destroy(V);
|
||||
@@ -5545,8 +5547,7 @@ public:
|
||||
void addNodeToList(SILInstruction *I);
|
||||
void removeNodeFromList(SILInstruction *I);
|
||||
void transferNodesFromList(ilist_traits<SILInstruction> &L2,
|
||||
ilist_iterator<SILInstruction> first,
|
||||
ilist_iterator<SILInstruction> last);
|
||||
instr_iterator first, instr_iterator last);
|
||||
|
||||
private:
|
||||
void createNode(const SILInstruction &);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "IRGen.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/IR/Argument.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/ADT/ilist.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
|
||||
@@ -170,8 +170,7 @@ void SILBasicBlock::moveAfter(SILBasicBlock *After) {
|
||||
void
|
||||
llvm::ilist_traits<swift::SILBasicBlock>::
|
||||
transferNodesFromList(llvm::ilist_traits<SILBasicBlock> &SrcTraits,
|
||||
llvm::ilist_iterator<SILBasicBlock> First,
|
||||
llvm::ilist_iterator<SILBasicBlock> Last) {
|
||||
block_iterator First, block_iterator Last) {
|
||||
assert(&Parent->getModule() == &SrcTraits.Parent->getModule() &&
|
||||
"Module mismatch!");
|
||||
|
||||
|
||||
@@ -79,8 +79,7 @@ void llvm::ilist_traits<SILInstruction>::removeNodeFromList(SILInstruction *I) {
|
||||
|
||||
void llvm::ilist_traits<SILInstruction>::
|
||||
transferNodesFromList(llvm::ilist_traits<SILInstruction> &L2,
|
||||
llvm::ilist_iterator<SILInstruction> first,
|
||||
llvm::ilist_iterator<SILInstruction> last) {
|
||||
instr_iterator first, instr_iterator last) {
|
||||
// If transferring instructions within the same basic block, no reason to
|
||||
// update their parent pointers.
|
||||
SILBasicBlock *ThisParent = getContainingBlock();
|
||||
|
||||
Reference in New Issue
Block a user