[llvm] [IR] Introduce captures attribute (PR #116990)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 09:01:46 PST 2024
================
@@ -273,6 +273,107 @@ raw_ostream &operator<<(raw_ostream &OS, MemoryEffects RMRB);
// Legacy alias.
using FunctionModRefBehavior = MemoryEffects;
+/// Components of the pointer that may be captured.
+enum class CaptureComponents : uint8_t {
+ None = 0,
+ AddressIsNull = (1 << 0),
+ Address = (1 << 1) | AddressIsNull,
+ ReadProvenance = (1 << 2),
+ Provenance = (1 << 3) | ReadProvenance,
+ All = Address | Provenance,
+ LLVM_MARK_AS_BITMASK_ENUM(Provenance),
+};
+
+inline bool capturesNothing(CaptureComponents CC) {
----------------
arichardson wrote:
I'm not sure what the following commits look like but maybe it would it be better for IDE code completion to have a struct wrapper with these as member functions?
https://github.com/llvm/llvm-project/pull/116990
More information about the llvm-commits
mailing list