[PATCH] D111751: [ptr_provenance] Add llvm-c support.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 06:48:45 PDT 2021


deadalnix requested changes to this revision.
deadalnix added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/tools/llvm-c-test/echo.cpp:634
+        LLVMExperimentalSetPtrProvenanceOperand(
+            Dst, LLVMExperimentalGetPtrProvenanceOperand(Src));
         break;
----------------
You need to clone the values, just like it is done for the Ptr one.

First, it ensures that the value is generated properly, but second, these value belong to different (even though identical if the test passes) modules. This is not expected to work and kind of is a miracle that this doesn't crash.


================
Comment at: llvm/tools/llvm-c-test/echo.cpp:645
+        LLVMExperimentalSetPtrProvenanceOperand(
+            Dst, LLVMExperimentalGetPtrProvenanceOperand(Src));
         break;
----------------
dito


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111751/new/

https://reviews.llvm.org/D111751



More information about the llvm-commits mailing list