diff options
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/AddReadAttrs.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/AddReadAttrs.cpp b/lib/Transforms/IPO/AddReadAttrs.cpp index 897548bad5..3e7d860d1d 100644 --- a/lib/Transforms/IPO/AddReadAttrs.cpp +++ b/lib/Transforms/IPO/AddReadAttrs.cpp @@ -63,7 +63,7 @@ bool AddReadAttrs::runOnSCC(const std::vector<CallGraphNode *> &SCC) { // Definitions with weak linkage may be overridden at linktime with // something that writes memory, so treat them like declarations. - if (F->isDeclaration() || F->hasWeakLinkage()) { + if (F->isDeclaration() || F->mayBeOverridden()) { if (!F->onlyReadsMemory()) // May write memory. return false; diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index aecec44aea..66fc2e33ea 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -155,7 +155,7 @@ bool IPCP::PropagateConstantReturn(Function &F) { // If this function could be overridden later in the link stage, we can't // propagate information about its results into callers. - if (F.hasLinkOnceLinkage() || F.hasWeakLinkage()) + if (F.hasLinkOnceLinkage() || F.mayBeOverridden()) return false; // Check to see if this function returns a constant. diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 622184415c..adaa9c1680 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -76,7 +76,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { if (F == 0) { SCCMightUnwind = true; SCCMightReturn = true; - } else if (F->isDeclaration() || F->hasWeakLinkage()) { + } else if (F->isDeclaration() || F->mayBeOverridden()) { SCCMightUnwind |= !F->doesNotThrow(); SCCMightReturn |= !F->doesNotReturn(); } else { |