mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[callgraph] Use one bump ptr alloctor for all memory allocated in the callgraph.
I also did some small llvm style fixes. Swift SVN r25515
This commit is contained in:
@@ -220,16 +220,14 @@ class CallGraph {
|
||||
llvm::DenseMap<SILFunction *, CallGraphNode *> FunctionToNodeMap;
|
||||
llvm::SmallVector<CallGraphSCC *, 16> BottomUpSCCOrder;
|
||||
std::vector<SILFunction *> BottomUpFunctionOrder;
|
||||
llvm::BumpPtrAllocator NodeAllocator;
|
||||
llvm::SpecificBumpPtrAllocator<CallGraphEdge> EdgeAllocator;
|
||||
|
||||
/// An allocator used by the callgraph.
|
||||
llvm::BumpPtrAllocator Allocator;
|
||||
|
||||
public:
|
||||
CallGraph(SILModule *M, bool completeModule);
|
||||
|
||||
~CallGraph() {
|
||||
for (auto *SCC : BottomUpSCCOrder)
|
||||
delete SCC;
|
||||
}
|
||||
~CallGraph() {}
|
||||
|
||||
llvm::SmallVectorImpl<CallGraphNode *> &getCallGraphRoots() {
|
||||
return CallGraphRoots;
|
||||
|
||||
Reference in New Issue
Block a user