[llvm] [LLVM] Refactor Autoupgrade function attributes from Module attributes. (PR #84494)

Daniel Hoekwater via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 18:19:04 PDT 2024


================
@@ -5182,65 +5182,46 @@ void llvm::UpgradeFunctionAttributes(Function &F) {
 static bool isModuleAttributeSet(Module &M, const StringRef &ModAttr) {
----------------
dhoekwater wrote:

Currently, this function treats "Attribute X is set with value 0" the same as "Attribute X is unset" for a given module.

This behavior causes functions within modules with no attributes to be annotated with the `sign-return-address`, `branch-target-enforcement`, `branch-protection-pauth-lr`, `guarded-control-stack`, and `sign-return-address-key` attributes.

https://github.com/llvm/llvm-project/pull/84494


More information about the llvm-commits mailing list