Skip to content

Commit 1f484cb

Browse files
mstorsjocuviper
authored andcommitted
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 08f7466 commit 1f484cb

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
@@ -485,6 +485,10 @@ class UnwindCursor : public AbstractUnwindCursor {
485485
DISPATCHER_CONTEXT *getDispatcherContext() { return &_dispContext; }
486486
void setDispatcherContext(DISPATCHER_CONTEXT *disp) { _dispContext = *disp; }
487487

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

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

0 commit comments

Comments
 (0)