[llvm] [CGData][Merger] Avoid merging the attached call target (PR #121030)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 17:06:04 PST 2024
================
@@ -60,11 +60,17 @@ static bool canParameterizeCallOperand(const CallBase *CI, unsigned OpIdx) {
if (Name.starts_with("__dtrace"))
return false;
}
- if (isCalleeOperand(CI, OpIdx) &&
- CI->getOperandBundle(LLVMContext::OB_ptrauth).has_value()) {
+ if (isCalleeOperand(CI, OpIdx)) {
// The operand is the callee and it has already been signed. Ignore this
// because we cannot add another ptrauth bundle to the call instruction.
- return false;
+ if (CI->getOperandBundle(LLVMContext::OB_ptrauth).has_value())
+ return false;
+ } else {
+ // The target of the arc-attached call must be a constant and cannot be
+ // parameterized.
+ if (CI->isOperandBundleOfType(llvm::LLVMContext::OB_clang_arc_attachedcall,
----------------
nocchijiang wrote:
```suggestion
if (CI->isOperandBundleOfType(LLVMContext::OB_clang_arc_attachedcall,
```
to be consistent with `CI->getOperandBundle(LLVMContext::OB_ptrauth)` above.
https://github.com/llvm/llvm-project/pull/121030
More information about the llvm-commits
mailing list