This is an archive of the discontinued LLVM Phabricator instance.

[IR] make a new ModFlagBehavior that errors when a module attribute is missing
AbandonedPublic

Authored by nickdesaulniers on Jun 7 2021, 3:47 PM.

Details

Reviewers
deadalnix
Summary

Promote override-stack-alignment to use it.

The problem with this approach is:
it looks like it's not possible to create a module with such semantics
then test it properly with llvm-link. The reason is that llvm-link
is structured to start with an empty module ("Composite"), then link in
the first module specified on the command line, then link in the rest of
the modules specified. So we can't disambiguate between the initial
empty module being linked against the initial source file with the
MDNode vs 2 full modules where 1 is missing the MD node. (ie. for two
input source files, the main module linking logic is run twice, not
once).

Diff Detail