mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-09 03:56:28 +00:00
Fix an out-of-bounds access in -view-sunit-dags in the case of an
empty ScheduleDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50054 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0416b0a26d
commit
639cdc210b
@ -301,7 +301,8 @@ namespace llvm {
|
||||
static void addCustomGraphFeatures(ScheduleDAG *G,
|
||||
GraphWriter<ScheduleDAG*> &GW) {
|
||||
GW.emitSimpleNode(0, "plaintext=circle", "GraphRoot");
|
||||
if (G->DAG.getRoot().Val)
|
||||
if (G->DAG.getRoot().Val &&
|
||||
G->SUnitMap.find(G->DAG.getRoot().Val) != G->SUnitMap.end())
|
||||
GW.emitEdge(0, -1, G->SUnitMap[G->DAG.getRoot().Val].front(), -1, "");
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user