[CallGraph] Make sure the edges are not missed due to re-declarations
authorAnna Zaks <ganna@apple.com>
Wed, 17 Dec 2014 00:34:07 +0000 (00:34 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 17 Dec 2014 00:34:07 +0000 (00:34 +0000)
commit87d404d4580be4005af4b6be6221e8e8b3814ac0
tree512a00aaf6548bf3fd25a919580fe08e054779f6
parent04b69f89aaf547d973353e49b2ada5bcd7a58972
[CallGraph] Make sure the edges are not missed due to re-declarations

A patch by Daniel DeFreez!

We were previously dropping edges on re-declarations. Store the
canonical declarations in the graph to ensure that different
references to the same function end up reflected with the same call graph
node.

(Note, this might lead to performance fluctuation because call graph
is used to determine the function analysis order.)

llvm-svn: 224398
clang/lib/Analysis/CallGraph.cpp
clang/test/Analysis/debug-CallGraph.c