diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-07-01 16:27:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-07-01 16:27:53 +0000 |
| commit | e809e3afd80efa3e16d5b62b9eb633f4e9f4671b (patch) | |
| tree | ab070d52d15ef11e328bf0cf2c87988625425716 /llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h | |
| parent | 8a30ad6d89a6c1f830a2174277fa69a82b47edff (diff) | |
| download | bcm5719-llvm-e809e3afd80efa3e16d5b62b9eb633f4e9f4671b.tar.gz bcm5719-llvm-e809e3afd80efa3e16d5b62b9eb633f4e9f4671b.zip | |
Do not treat global variables as functions! (and assert failing)
llvm-svn: 7030
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h')
| -rw-r--r-- | llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h b/llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h index 783bfa58dab..39a16d6f7e1 100644 --- a/llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h +++ b/llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h @@ -39,9 +39,11 @@ struct DSCallSiteIterator { DSNode *CalleeNode = (*FCs)[CallSite].getCalleeNode(); if (CallSiteEntry || isCompleteNode(CalleeNode)) { const std::vector<GlobalValue*> &Callees = CalleeNode->getGlobals(); - - if (CallSiteEntry < Callees.size()) - return; + while (CallSiteEntry < Callees.size()) { + if (isa<Function>(Callees[CallSiteEntry])) + return; + ++CallSiteEntry; + } } } CallSiteEntry = 0; |

