mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Less conservative verison of previous patch,
suggested by Duncan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6a6f2dda36
commit
1f7580c5eb
@ -73,10 +73,10 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
for (unsigned i = 0, e = SCC.size();
|
||||
(!SCCMightUnwind || !SCCMightReturn) && i != e; ++i) {
|
||||
Function *F = SCC[i]->getFunction();
|
||||
if (F == 0 || (F->hasWeakLinkage() && !F->doesNotThrow())) {
|
||||
if (F == 0) {
|
||||
SCCMightUnwind = true;
|
||||
SCCMightReturn = true;
|
||||
} else if (F->isDeclaration()) {
|
||||
} else if (F->isDeclaration() || F->hasWeakLinkage()) {
|
||||
SCCMightUnwind |= !F->doesNotThrow();
|
||||
SCCMightReturn |= !F->doesNotReturn();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user