Index: lib/Target/Hexagon/RDFGraph.h =================================================================== --- lib/Target/Hexagon/RDFGraph.h +++ lib/Target/Hexagon/RDFGraph.h @@ -946,11 +946,12 @@ if (NextOnly) break; NA = G.addr(NA.Addr->getNext()); - } else { + } else if (NA.Addr->getType() == NodeAttrs::Code) { // We've hit the beginning of the chain. - assert(NA.Addr->getType() == NodeAttrs::Code); NodeAddr CA = NA; NA = CA.Addr->getFirstMember(G); + } else { // No node found. + break; } } // Return the equivalent of "nullptr" if such a node was not found.