forked from OSchip/llvm-project
parent
de8e3a097c
commit
2865be79f8
|
@ -141,8 +141,11 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||||
!I->hasLocalLinkage() && // Can't already have internal linkage
|
!I->hasLocalLinkage() && // Can't already have internal linkage
|
||||||
!ExternalNames.count(I->getName())) {// Not marked to keep external?
|
!ExternalNames.count(I->getName())) {// Not marked to keep external?
|
||||||
I->setLinkage(GlobalValue::InternalLinkage);
|
I->setLinkage(GlobalValue::InternalLinkage);
|
||||||
// Remove a callgraph edge from the external node to this function.
|
|
||||||
if (ExternalNode) ExternalNode->removeOneAbstractEdgeTo((*CG)[I]);
|
if (ExternalNode)
|
||||||
|
// Remove a callgraph edge from the external node to this function.
|
||||||
|
ExternalNode->removeOneAbstractEdgeTo((*CG)[I]);
|
||||||
|
|
||||||
Changed = true;
|
Changed = true;
|
||||||
++NumFunctions;
|
++NumFunctions;
|
||||||
DEBUG(dbgs() << "Internalizing func " << I->getName() << "\n");
|
DEBUG(dbgs() << "Internalizing func " << I->getName() << "\n");
|
||||||
|
|
Loading…
Reference in New Issue