mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 13:44:28 +00:00
Increase odds that this won't bork things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c97a2075d9
commit
28b8ed90c7
@ -78,6 +78,11 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
|
||||
///
|
||||
Module *BugDriver::performFinalCleanups() const {
|
||||
Module *M = CloneModule(Program);
|
||||
|
||||
// Make all functions external, so GlobalDCE doesn't delete them...
|
||||
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||
I->setLinkage(GlobalValue::ExternalLinkage);
|
||||
|
||||
PassManager CleanupPasses;
|
||||
CleanupPasses.add(createFunctionResolvingPass());
|
||||
CleanupPasses.add(createGlobalDCEPass());
|
||||
|
Loading…
Reference in New Issue
Block a user