Skip to content

Commit 6ccad0a

Browse files
committed
Provide a placement new definition for the SEH version of UnwindCursor
This fixes compilation after SVN r352966 in SEH mode. llvm-svn: 353010
1 parent 8799cae commit 6ccad0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libunwind/src/UnwindCursor.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,10 @@ class UnwindCursor : public AbstractUnwindCursor {
482482
DISPATCHER_CONTEXT *getDispatcherContext() { return &_dispContext; }
483483
void setDispatcherContext(DISPATCHER_CONTEXT *disp) { _dispContext = *disp; }
484484

485+
// libunwind does not and should not depend on C++ library which means that we
486+
// need our own defition of inline placement new.
487+
static void *operator new(size_t, UnwindCursor<A, R> *p) { return p; }
488+
485489
private:
486490

487491
pint_t getLastPC() const { return _dispContext.ControlPc; }

0 commit comments

Comments
 (0)