forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADT: Never allocate nodes in iplist<> and ilist<>
Remove createNode() and any API that depending on it, and add HasCreateNode to the list of checks for HasObsoleteCustomizations. Now an ilist *never* allocates (this was already true for iplist). This factors out all the differences between iplist and ilist. I'll aim to rename both to "owning_ilist" eventually, to call out the interesting (not exactly intrusive) ownership semantics. In the meantime, I've left both names around to reduce code churn. One of the deleted APIs is the ilist copy constructor. I've lifted up and tested iplist::cloneFrom (ala simple_ilist::cloneFrom) as a replacement. Users of ilist<> and iplist<> that want the list to allocate nodes have a few options: - use std::list; - use AllocatorList or BumpPtrList (or build a similarly trivial list); - use cloneFrom (which is explicit at the call site); or - allocate at the call site. See r280573, r281177, r281181, and r281182 for examples of what to do if you're updating out-of-tree code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281184 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
8650ea1
commit a66f054
Showing
6 changed files
with
75 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters