LLVM  6.0.0svn
MachineModuleInfoImpls.cpp
Go to the documentation of this file.
1 //===- llvm/CodeGen/MachineModuleInfoImpls.cpp ----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements object-file format specific implementations of
11 // MachineModuleInfoImpl.
12 //
13 //===----------------------------------------------------------------------===//
14 
16 #include "llvm/ADT/DenseMap.h"
17 #include "llvm/MC/MCSymbol.h"
18 
19 using namespace llvm;
20 
21 //===----------------------------------------------------------------------===//
22 // MachineModuleInfoMachO
23 //===----------------------------------------------------------------------===//
24 
25 // Out of line virtual method.
26 void MachineModuleInfoMachO::anchor() {}
27 void MachineModuleInfoELF::anchor() {}
28 
29 using PairTy = std::pair<MCSymbol *, MachineModuleInfoImpl::StubValueTy>;
30 static int SortSymbolPair(const PairTy *LHS, const PairTy *RHS) {
31  return LHS->first->getName().compare(RHS->first->getName());
32 }
33 
37 
38  array_pod_sort(List.begin(), List.end(), SortSymbolPair);
39 
40  Map.clear();
41  return List;
42 }
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
std::pair< MCSymbol *, MachineModuleInfoImpl::StubValueTy > PairTy
static int SortSymbolPair(const PairTy *LHS, const PairTy *RHS)
void array_pod_sort(IteratorTy Start, IteratorTy End)
array_pod_sort - This sorts an array with the specified start and end extent.
Definition: STLExtras.h:759
const NodeList & List
Definition: RDFGraph.cpp:210
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
static SymbolListTy getSortedStubs(DenseMap< MCSymbol *, StubValueTy > &)
Return the entries from a DenseMap in a deterministic sorted orer.