diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.h')
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index 40a7502973e..61d9f02a08f 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -374,6 +374,11 @@ public: return new (Buffer) T(N, a0, a1, a2); } + void pushCopyOfCleanup(CleanupKind Kind, const void *Cleanup, size_t Size) { + void *Buffer = pushCleanup(Kind, Size); + std::memcpy(Buffer, Cleanup, Size); + } + /// Pops a cleanup scope off the stack. This is private to CGCleanup.cpp. void popCleanup(); |