From: Chris Lattner Date: Fri, 5 Mar 2004 22:04:07 +0000 (+0000) Subject: Fix a minor bug X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=deb8712b49bde50cd56e14c0f202bf86306a54b9;p=oota-llvm.git Fix a minor bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12169 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp index 95c9d3cf5db..87b96b266a4 100644 --- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp +++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp @@ -71,7 +71,8 @@ bool CompleteBUDataStructures::run(Module &M) { unsigned NextID = 1; if (Function *Main = M.getMainFunction()) { - calculateSCCGraphs(getOrCreateGraph(*Main), Stack, NextID, ValMap); + if (!Main->isExternal()) + calculateSCCGraphs(getOrCreateGraph(*Main), Stack, NextID, ValMap); } else { std::cerr << "CBU-DSA: No 'main' function found!\n"; }