mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-15 16:38:41 +00:00
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
This commit is contained in:
parent
4d5af8e894
commit
49e88e80c7
@ -85,7 +85,7 @@ bool BUDataStructures::runOnModule(Module &M) {
|
|||||||
// Merge the globals variables (not the calls) from the globals graph back
|
// 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
|
// 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.
|
// the information about global pools and GV usage in the program.
|
||||||
if (MainFunc) {
|
if (MainFunc && !MainFunc->isExternal()) {
|
||||||
DSGraph &MainGraph = getOrCreateGraph(MainFunc);
|
DSGraph &MainGraph = getOrCreateGraph(MainFunc);
|
||||||
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
||||||
ReachabilityCloner RC(MainGraph, GG,
|
ReachabilityCloner RC(MainGraph, GG,
|
||||||
|
@ -94,7 +94,7 @@ bool CompleteBUDataStructures::runOnModule(Module &M) {
|
|||||||
// Merge the globals variables (not the calls) from the globals graph back
|
// 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
|
// 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.
|
// the information about global pools and GV usage in the program.
|
||||||
if (MainFunc) {
|
if (MainFunc && !MainFunc->isExternal()) {
|
||||||
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
|
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
|
||||||
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
||||||
ReachabilityCloner RC(MainGraph, GG,
|
ReachabilityCloner RC(MainGraph, GG,
|
||||||
|
@ -106,7 +106,7 @@ bool EquivClassGraphs::runOnModule(Module &M) {
|
|||||||
// Merge the globals variables (not the calls) from the globals graph back
|
// 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
|
// 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.
|
// the information about global pools and GV usage in the program.
|
||||||
if (MainFunc) {
|
if (MainFunc && !MainFunc->isExternal()) {
|
||||||
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
|
DSGraph &MainGraph = getOrCreateGraph(*MainFunc);
|
||||||
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
const DSGraph &GG = *MainGraph.getGlobalsGraph();
|
||||||
ReachabilityCloner RC(MainGraph, GG,
|
ReachabilityCloner RC(MainGraph, GG,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user