[llvm-branch-commits] [CaptureTracking] Handle ptrtoaddr (PR #152221)

Alexander Richardson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 6 08:43:07 PDT 2025


================
@@ -359,6 +359,11 @@ UseCaptureInfo llvm::DetermineUseCaptureKind(const Use &U, const Value *Base) {
   case Instruction::AddrSpaceCast:
     // The original value is not captured via this if the new value isn't.
     return UseCaptureInfo::passthrough();
+  case Instruction::PtrToAddr:
+    // FIXME: the following does not work as expected, so just assume address
+    // is always captured:
+    //  return UseCaptureInfo(CaptureComponents::None, CaptureComponents::Address);
----------------
arichardson wrote:

Thanks for confirming this! Somehow skipped over that section of LangRef. Will update

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


More information about the llvm-branch-commits mailing list