diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-15 22:10:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-15 22:10:04 +0000 |
commit | 21a79edb2739d819b05ee534c9981f3bedacee95 (patch) | |
tree | 8662dd86d18e4e445bf4392637eb1a87428f079f /llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp | |
parent | dadf4b369eb14a7e457132ead98c7e0c82419bf4 (diff) | |
download | bcm5719-llvm-21a79edb2739d819b05ee534c9981f3bedacee95.tar.gz bcm5719-llvm-21a79edb2739d819b05ee534c9981f3bedacee95.zip |
fix crashes when we only have a prototype for main.
llvm-svn: 20627
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp index 2ddc684e010..e895ef3c135 100644 --- a/llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/llvm/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, |