[CallGraph] Given -print-callgraph a stable printing order.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 19 Jun 2015 23:20:31 +0000 (23:20 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 19 Jun 2015 23:20:31 +0000 (23:20 +0000)
commit152f3b5997d3d0667cabdcdbf13ed177d8dd685b
treed2e02f46909a29343da67513a8c3d663a2fe59e2
parent9b3369eafc30e66b0444838ab9c6424747ab979f
[CallGraph] Given -print-callgraph a stable printing order.

Summary:
Since FunctionMap has llvm::Function pointers as keys, the order in
which the traversal happens can differ from run to run, causing spurious
FileCheck failures.  Have CallGraph::print sort the CallGraphNodes by
name before printing them.

Reviewers: bogner, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10575

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240191 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/CallGraph.cpp
test/Analysis/CallGraph/non-leaf-intrinsics.ll