mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-07 15:33:14 +01:00
Add a pass to strip the bodies of available_externally functions so string
literals and `TypeInfo`s only referenced by them can be deleted by `-globaldce`.
This commit is contained in:
@@ -222,6 +222,9 @@ static void addPassesForOptLevel(PassManager& pm) {
|
||||
}
|
||||
|
||||
if (optimizeLevel >= 1) {
|
||||
#if LLVM_REV >= 68940
|
||||
addPass(pm, createStripExternalsPass());
|
||||
#endif
|
||||
addPass(pm, createGlobalDCEPass());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user