summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/Ownership.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/Ownership.h')
-rw-r--r--include/clang/Sema/Ownership.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Sema/Ownership.h b/include/clang/Sema/Ownership.h
index e064b91..c3d1f4e 100644
--- a/include/clang/Sema/Ownership.h
+++ b/include/clang/Sema/Ownership.h
@@ -207,6 +207,15 @@ namespace clang {
assert((PtrWithInvalid & 0x01) == 0 && "Badly aligned pointer");
return *this;
}
+
+ // For types where we can fit a flag in with the pointer, provide
+ // conversions to/from pointer type.
+ static ActionResult getFromOpaquePointer(void *P) {
+ ActionResult Result;
+ Result.PtrWithInvalid = (uintptr_t)P;
+ return Result;
+ }
+ void *getAsOpaquePointer() const { return (void*)PtrWithInvalid; }
};
/// An opaque type for threading parsed type information through the
OpenPOWER on IntegriCloud