mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,7 +84,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
|
||||
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
|
||||
CallSite CS = CallSite::get(I);
|
||||
if (CS.getInstruction() && (!CS.getCalledFunction() ||
|
||||
!CS.getCalledFunction()->isExternal()))
|
||||
!CS.getCalledFunction()->isDeclaration()))
|
||||
CallSites.push_back(CS);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
|
||||
for (unsigned CSi = 0; CSi != CallSites.size(); ++CSi)
|
||||
if (Function *Callee = CallSites[CSi].getCalledFunction()) {
|
||||
// Calls to external functions are never inlinable.
|
||||
if (Callee->isExternal() ||
|
||||
if (Callee->isDeclaration() ||
|
||||
CallSites[CSi].getInstruction()->getParent()->getParent() ==Callee){
|
||||
if (SCC.size() == 1) {
|
||||
std::swap(CallSites[CSi], CallSites.back());
|
||||
|
||||
Reference in New Issue
Block a user