[llvm] [PAC][ELF] Place AUTH constants in .data.rel.ro for position dependent code (PR #150418)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 07:51:08 PDT 2025
================
@@ -226,6 +227,20 @@ void TargetLoweringObjectFile::emitPseudoProbeDescMetadata(
}
}
+static bool containsConstantPtrAuth(const Constant *C) {
+ if (isa<ConstantPtrAuth>(C))
+ return true;
+
+ if (isa<BlockAddress>(C) || isa<GlobalValue>(C))
+ return false;
----------------
atrosinenko wrote:
On the other hand, I would expect `containsConstantPtrAuth` to return false for `@ptr_to_global_var = constant ptr @global_var` no matter how `@global_value` is defined - I guess recursively inspecting `GlobalValue`s would make `containsConstantPtrAuth` incorrectly return `true` in such cases. Thus, the original "issue" should considered as a matter of comments or naming, if at all.
https://github.com/llvm/llvm-project/pull/150418
More information about the llvm-commits
mailing list