summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-08-30 18:40:47 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-08-30 18:40:47 +0000
commitf947c3afe10cf4a8ca3574ddd4deee2032254c53 (patch)
treeb84e7e98ea1822fdbbbd62346ad43cf00e4bca3c /llvm/lib/CodeGen/MachineFunction.cpp
parent982a3bcc4896d3edb7c66d69095335eddcae5c18 (diff)
downloadbcm5719-llvm-f947c3afe10cf4a8ca3574ddd4deee2032254c53.tar.gz
bcm5719-llvm-f947c3afe10cf4a8ca3574ddd4deee2032254c53.zip
ADT: Split ilist_node_traits into alloc and callback, NFC
Many lists want to override only allocation semantics, or callbacks for iplist. Split these up to prevent code duplication. - Specialize ilist_alloc_traits to change the implementations of deleteNode() and createNode(). - One common desire is to do nothing deleteNode() and disable createNode(). Specialize ilist_alloc_traits to inherit from ilist_noalloc_traits for that behaviour. - Specialize ilist_callback_traits to use the addNodeToList(), removeNodeFromList(), and transferNodesFromList() callbacks. As a drive-by, add some coverage to the callback-related unit tests. llvm-svn: 280128
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index c8039f5e876..7f1bb9294ad 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -86,7 +86,7 @@ void MachineFunctionProperties::print(raw_ostream &OS) const {
// Out-of-line virtual method.
MachineFunctionInfo::~MachineFunctionInfo() {}
-void ilist_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) {
+void ilist_alloc_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) {
MBB->getParent()->DeleteMachineBasicBlock(MBB);
}
OpenPOWER on IntegriCloud