aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-15 22:10:04 +0000
committerChris Lattner <sabre@nondot.org>2005-03-15 22:10:04 +0000
commit49e88e80c78eff3d0bed3874448d4f3049c9be16 (patch)
tree4cb1816891c2523dc3876a90c161915a88f6491a /lib/Analysis
parent4d5af8e894e97eeb6268120f4b7ab464c8a9aeee (diff)
fix crashes when we only have a prototype for main.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/BottomUpClosure.cpp2
-rw-r--r--lib/Analysis/DataStructure/CompleteBottomUp.cpp2
-rw-r--r--lib/Analysis/DataStructure/EquivClassGraphs.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 6c26602889..91cfc7c14e 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -85,7 +85,7 @@ bool BUDataStructures::runOnModule(Module &M) {
// Merge the globals variables (not the calls) from the globals graph back
// into the main function's graph so that the main function contains all of
// the information about global pools and GV usage in the program.
- if (MainFunc) {
+ if (MainFunc && !MainFunc->isExternal()) {
DSGraph &MainGraph = getOrCreateGraph(MainFunc);
const DSGraph &GG = *MainGraph.getGlobalsGraph();
ReachabilityCloner RC(MainGraph, GG,
diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
index 4dcfc35483..5a0436c061 100644
--- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp
+++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
@@ -94,7 +94,7 @@ bool CompleteBUDataStructures::runOnModule(Module &M) {
// Merge the globals variables (not the calls) from the globals graph back
// into the main function's graph so that the main function contains all of
// the information about global pools and GV usage in the program.
- if (MainFunc) {
+ if (MainFunc && !MainFunc->isExternal()) {
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
const DSGraph &GG = *MainGraph.getGlobalsGraph();
ReachabilityCloner RC(MainGraph, GG,
diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index 2ddc684e01..e895ef3c13 100644
--- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -106,7 +106,7 @@ bool EquivClassGraphs::runOnModule(Module &M) {
// Merge the globals variables (not the calls) from the globals graph back
// into the main function's graph so that the main function contains all of
// the information about global pools and GV usage in the program.
- if (MainFunc) {
+ if (MainFunc && !MainFunc->isExternal()) {
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
const DSGraph &GG = *MainGraph.getGlobalsGraph();
ReachabilityCloner RC(MainGraph, GG,