From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266281
91177308-0d34-0410-b5e6-
96231b3b80d8
/// one copy.
static void ResolveODR(Module &TheModule,
const ModuleSummaryIndex &Index) {
+ if (Index.modulePaths().size() == 1)
+ // Nothing to do if we don't have multiple modules
+ return;
+
// We won't optimize the globals that are referenced by an alias for now
// Ideally we should turn the alias into a global and duplicate the definition
// when needed.