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 | b6734b281b0ec657cd95963430fbe36ed7182f6e (patch) | |
tree | 10b2f33056ecbccc9da2908422194dfbd508ac78 /lib/Analysis | |
parent | d9dad2cf6127265c7c306dcdafdd4823767628c3 (diff) | |
download | external_llvm-b6734b281b0ec657cd95963430fbe36ed7182f6e.zip external_llvm-b6734b281b0ec657cd95963430fbe36ed7182f6e.tar.gz external_llvm-b6734b281b0ec657cd95963430fbe36ed7182f6e.tar.bz2 |
Do not treat global variables as functions! (and assert failing)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DataStructure/DSCallSiteIterator.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/DSCallSiteIterator.h b/lib/Analysis/DataStructure/DSCallSiteIterator.h index 783bfa5..39a16d6 100644 --- a/lib/Analysis/DataStructure/DSCallSiteIterator.h +++ b/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; |