llvm-project/llvm/lib/Linker
Fangrui Song b3fd3a9ac3 [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible
D123493 introduced llvm::Module::Min to encode module flags metadata for AArch64
BTI/PAC-RET. llvm::Module::Min does not take effect when the flag is absent in
one module. This behavior is misleading and does not address backward
compatibility problems (when a bitcode with "branch-target-enforcement"==1 and
another without the flag are merged, the merge result is 1 instead of 0).

To address the problems, require Min flags to be non-negative and treat absence
as having a value of zero. For an old bitcode without
"branch-target-enforcement"/"sign-return-address", its value is as if 0.

Differential Revision: https://reviews.llvm.org/D129911
2022-07-18 09:35:12 -07:00
..
CMakeLists.txt
IRMover.cpp [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible 2022-07-18 09:35:12 -07:00
LinkDiagnosticInfo.h
LinkModules.cpp Cleanup includes: Linker 2022-03-22 09:51:21 +01:00