mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Add sanity check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5489 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6c0b5dba4
commit
f52ade928c
@ -53,7 +53,10 @@ public:
|
||||
~DSGraph();
|
||||
|
||||
bool hasFunction() const { return Func != 0; }
|
||||
Function &getFunction() const { return *Func; }
|
||||
Function &getFunction() const {
|
||||
assert(hasFunction() && "Cannot call getFunction on graph without a fn!");
|
||||
return *Func;
|
||||
}
|
||||
|
||||
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
||||
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
||||
|
@ -53,7 +53,10 @@ public:
|
||||
~DSGraph();
|
||||
|
||||
bool hasFunction() const { return Func != 0; }
|
||||
Function &getFunction() const { return *Func; }
|
||||
Function &getFunction() const {
|
||||
assert(hasFunction() && "Cannot call getFunction on graph without a fn!");
|
||||
return *Func;
|
||||
}
|
||||
|
||||
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
||||
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
||||
|
@ -1029,6 +1029,7 @@ void DSGraph::removeDeadNodes(unsigned Flags) {
|
||||
if (AuxFCallsAlive[i])
|
||||
AuxFunctionCalls[CurIdx++].swap(AuxFunctionCalls[i]);
|
||||
if (!(Flags & DSGraph::RemoveUnreachableGlobals)) {
|
||||
assert(GlobalsGraph && "No globals graph available??");
|
||||
// Move the unreachable call nodes to the globals graph...
|
||||
GlobalsGraph->AuxFunctionCalls.insert(GlobalsGraph->AuxFunctionCalls.end(),
|
||||
AuxFunctionCalls.begin()+CurIdx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user