summaryrefslogtreecommitdiffstats
path: root/tools/lto/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index b1c4f43..d9fa218 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -342,7 +342,9 @@ void LTOCodeGenerator::applyScopeRestrictions() {
passes.add(createInternalizePass(mustPreserveList));
// apply scope restrictions
+ passes.doInitialization();
passes.run(*mergedModule);
+ passes.doFinalization();
_scopeRestrictionsDone = true;
}
@@ -397,7 +399,9 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
}
// Run our queue of passes all at once now, efficiently.
+ passes.doInitialization();
passes.run(*mergedModule);
+ passes.doFinalization();
// Run the code generator, and write assembly file
codeGenPasses->doInitialization();