Skip to content

Commit 74eff4d

Browse files
Revert "[llvm][ARM][AArch64] Add attributes to synthetic functions. (#83153)"
This reverts commit 4c7fd7e.
1 parent da31b68 commit 74eff4d

File tree

3 files changed

+0
-95
lines changed

3 files changed

+0
-95
lines changed

llvm/lib/IR/Function.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -407,35 +407,6 @@ Function *Function::createWithDefaultAttr(FunctionType *Ty,
407407
StringRef DefaultFeatures = F->getContext().getDefaultTargetFeatures();
408408
if (!DefaultFeatures.empty())
409409
B.addAttribute("target-features", DefaultFeatures);
410-
411-
// Check if the module attribute is present and not zero.
412-
auto isModuleAttributeSet = [&](const StringRef &ModAttr) -> bool {
413-
const auto *Attr =
414-
mdconst::extract_or_null<ConstantInt>(M->getModuleFlag(ModAttr));
415-
return Attr && !Attr->isZero();
416-
};
417-
418-
auto AddAttributeIfSet = [&](const StringRef &ModAttr) {
419-
if (isModuleAttributeSet(ModAttr))
420-
B.addAttribute(ModAttr);
421-
};
422-
423-
StringRef SignType = "none";
424-
if (isModuleAttributeSet("sign-return-address"))
425-
SignType = "non-leaf";
426-
if (isModuleAttributeSet("sign-return-address-all"))
427-
SignType = "all";
428-
if (SignType != "none") {
429-
B.addAttribute("sign-return-address", SignType);
430-
B.addAttribute("sign-return-address-key",
431-
isModuleAttributeSet("sign-return-address-with-bkey")
432-
? "b_key"
433-
: "a_key");
434-
}
435-
AddAttributeIfSet("branch-target-enforcement");
436-
AddAttributeIfSet("branch-protection-pauth-lr");
437-
AddAttributeIfSet("guarded-control-stack");
438-
439410
F->addFnAttrs(B);
440411
return F;
441412
}

llvm/test/Instrumentation/AddressSanitizer/module-flags-aarch64.ll

Lines changed: 0 additions & 33 deletions
This file was deleted.

llvm/test/Instrumentation/MemorySanitizer/AArch64/module-flags-aarch64.ll

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)