llvm.org GIT mirror llvm / 64fae75
Revert the 'EnableInitializing' flag. There is debate on whether we should run that pass by default in LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154356 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
1 changed file(s) with 0 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
4545 #include "llvm/ADT/StringExtras.h"
4646 using namespace llvm;
4747
48 static cl::opt EnableInternalizing("enable-internalizing", cl::init(false),
49 cl::desc("Internalize functions during LTO"));
50
5148 static cl::opt DisableInline("disable-inlining", cl::init(false),
5249 cl::desc("Do not run the inliner pass"));
5350
277274 }
278275
279276 void LTOCodeGenerator::applyScopeRestrictions() {
280 // Internalize only if specifically asked for. Otherwise, global symbols which
281 // exist in the final image, but which are used outside of that image
282 // (e.g. bundling) may be removed. This also happens when a function is used
283 // only in inline asm. LLVM doesn't recognize that as a "use", so it could be
284 // stripped.
285 if (!EnableInternalizing)
286 return;
287
288277 if (_scopeRestrictionsDone) return;
289278 Module *mergedModule = _linker.getModule();
290279