This is an archive of the discontinued LLVM Phabricator instance.

[Assembler] Allow assembling empty index with non-zero flags
ClosedPublic

Authored by evgeny777 on Feb 18 2020, 9:49 AM.

Diff Detail

Event Timeline

evgeny777 created this revision.Feb 18 2020, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2020, 9:49 AM
Herald added a subscriber: arphaman. · View Herald Transcript

What is the use case? Even with an empty module we at least get a module path entry. Hmm, we won't get a combined summary in that case either (with only entry being module path). Should this instead be changed to create the index if there is a module path entry (or in addition to checking flags)?

I was thinking of addressing 'skip-module-by-distributed-backend' case. For instance see writeEmptyDistributedBuildOutputs:

if (SkipModule) {
  ModuleSummaryIndex Index(/*HaveGVs*/ false);
  Index.setSkipModuleByDistributedBackend();
  WriteIndexToFile(Index, OS, nullptr);
}
tejohnson accepted this revision.Feb 21 2020, 9:55 AM

LGTM. Ok makes sense, please update the comment to note that we check for non-empty flags too for that specific case.

This revision is now accepted and ready to land.Feb 21 2020, 9:55 AM
This revision was automatically updated to reflect the committed changes.