From deb8712b49bde50cd56e14c0f202bf86306a54b9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Mar 2004 22:04:07 +0000 Subject: [PATCH] Fix a minor bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12169 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/CompleteBottomUp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; } -- 2.34.1