mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
Simplify code a bit, and be sure to mark the external node as potentially throwing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
133dbb1285
commit
d08ddd3300
@ -51,9 +51,9 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
// obviously the SCC might throw.
|
||||
//
|
||||
bool SCCMightThrow = false;
|
||||
for (unsigned i = 0, e = SCC.size(); !SCCMightThrow && i != e; ++i)
|
||||
if (Function *F = SCC[i]->getFunction())
|
||||
if (F->isExternal() && !F->getIntrinsicID()) {
|
||||
for (unsigned i = 0, e = SCC.size(); !SCCMightThrow && i != e; ++i) {
|
||||
Function *F = SCC[i]->getFunction();
|
||||
if (F == 0 || (F->isExternal() && !F->getIntrinsicID())) {
|
||||
SCCMightThrow = true;
|
||||
} else {
|
||||
// Check to see if this function performs an unwind or calls an
|
||||
@ -87,7 +87,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
if (SCCMightThrow) break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
bool MadeChange = false;
|
||||
|
||||
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user