[PATCH] D103851: [IR] make a new ModFlagBehavior that errors when a module attribute is missing
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 7 15:47:28 PDT 2021
nickdesaulniers created this revision.
Herald added a reviewer: deadalnix.
Herald added subscribers: dexonsmith, hiraditya.
nickdesaulniers requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
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).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103851
Files:
clang/test/CodeGen/stackrealign-main.c
llvm/include/llvm-c/Core.h
llvm/include/llvm/IR/Module.h
llvm/lib/IR/Core.cpp
llvm/lib/IR/Module.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/stack-alignment.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103851.350440.patch
Type: text/x-patch
Size: 8576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210607/194c1d9d/attachment.bin>
More information about the cfe-commits
mailing list