Skip to content

Commit

Permalink
Provide a placement new definition for the SEH version of UnwindCursor
Browse files Browse the repository at this point in the history
This fixes compilation after SVN r352966 in SEH mode.

llvm-svn: 353010
  • Loading branch information
mstorsjo committed Feb 3, 2019
1 parent 8799cae commit 6ccad0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libunwind/src/UnwindCursor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ class UnwindCursor : public AbstractUnwindCursor {
DISPATCHER_CONTEXT *getDispatcherContext() { return &_dispContext; }
void setDispatcherContext(DISPATCHER_CONTEXT *disp) { _dispContext = *disp; }

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

private:

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

0 comments on commit 6ccad0a

Please sign in to comment.