File tree Expand file tree Collapse file tree 4 files changed +10
-16
lines changed
include/llvm/ExecutionEngine/JITLink
lib/ExecutionEngine/JITLink
test/ExecutionEngine/JITLink/x86-64 Expand file tree Collapse file tree 4 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 15
15
16
16
#include " llvm/ADT/DenseMap.h"
17
17
#include " llvm/ADT/DenseSet.h"
18
+ #include " llvm/ADT/MapVector.h"
18
19
#include " llvm/ADT/FunctionExtras.h"
19
20
#include " llvm/ADT/STLExtras.h"
20
21
#include " llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
@@ -853,7 +854,7 @@ class SectionRange {
853
854
854
855
class LinkGraph {
855
856
private:
856
- using SectionMap = DenseMap <StringRef, std::unique_ptr<Section>>;
857
+ using SectionMap = MapVector <StringRef, std::unique_ptr<Section>>;
857
858
using ExternalSymbolMap = StringMap<Symbol *>;
858
859
using AbsoluteSymbolSet = DenseSet<Symbol *>;
859
860
using BlockSet = DenseSet<Block *>;
@@ -1595,7 +1596,7 @@ class LinkGraph {
1595
1596
unsigned PointerSize;
1596
1597
llvm::endianness Endianness;
1597
1598
GetEdgeKindNameFunction GetEdgeKindName = nullptr ;
1598
- DenseMap <StringRef, std::unique_ptr<Section>> Sections;
1599
+ MapVector <StringRef, std::unique_ptr<Section>> Sections;
1599
1600
ExternalSymbolMap ExternalSymbols;
1600
1601
AbsoluteSymbolSet AbsoluteSymbols;
1601
1602
orc::shared::AllocActions AAs;
Original file line number Diff line number Diff line change @@ -291,18 +291,11 @@ void LinkGraph::dump(raw_ostream &OS) {
291
291
return false ;
292
292
});
293
293
294
- std::vector<Section *> SortedSections;
295
- for (auto &Sec : sections ())
296
- SortedSections.push_back (&Sec);
297
- llvm::sort (SortedSections, [](const Section *LHS, const Section *RHS) {
298
- return LHS->getName () < RHS->getName ();
299
- });
300
-
301
- for (auto *Sec : SortedSections) {
302
- OS << " section " << Sec->getName () << " :\n\n " ;
294
+ for (auto &Sec : sections ()) {
295
+ OS << " section " << Sec.getName () << " :\n\n " ;
303
296
304
297
std::vector<Block *> SortedBlocks;
305
- llvm::copy (Sec-> blocks (), std::back_inserter (SortedBlocks));
298
+ llvm::copy (Sec. blocks (), std::back_inserter (SortedBlocks));
306
299
llvm::sort (SortedBlocks, [](const Block *LHS, const Block *RHS) {
307
300
return LHS->getAddress () < RHS->getAddress ();
308
301
});
Original file line number Diff line number Diff line change 7
7
# parent block is dead.
8
8
#
9
9
# CHECK: Link graph
10
- # CHECK-DAG: section child:
11
- # CHECK-EMPTY:
12
10
# CHECK-DAG: section parent:
13
11
# CHECK-EMPTY:
12
+ # CHECK-DAG: section child:
13
+ # CHECK-EMPTY:
14
14
15
15
--- !COFF
16
16
header:
Original file line number Diff line number Diff line change 8
8
#
9
9
# CHECK: section .func:
10
10
# CHECK-EMPTY:
11
- # CHECK-NEXT: section .pdata :
11
+ # CHECK-NEXT: section .xdata :
12
12
# CHECK-EMPTY:
13
- # CHECK: section .xdata :
13
+ # CHECK-NEXT : section .pdata :
14
14
# CHECK-EMPTY:
15
15
16
16
.text
You can’t perform that action at this time.
0 commit comments