[libunwind] r353010 - Provide a placement new definition for the SEH version of UnwindCursor

Martin Storsjo via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 3 14:16:53 PST 2019


Author: mstorsjo
Date: Sun Feb  3 14:16:53 2019
New Revision: 353010

URL: http://llvm.org/viewvc/llvm-project?rev=353010&view=rev
Log:
Provide a placement new definition for the SEH version of UnwindCursor

This fixes compilation after SVN r352966 in SEH mode.

Modified:
    libunwind/trunk/src/UnwindCursor.hpp

Modified: libunwind/trunk/src/UnwindCursor.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/UnwindCursor.hpp?rev=353010&r1=353009&r2=353010&view=diff
==============================================================================
--- libunwind/trunk/src/UnwindCursor.hpp (original)
+++ libunwind/trunk/src/UnwindCursor.hpp Sun Feb  3 14:16:53 2019
@@ -482,6 +482,10 @@ public:
   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; }




More information about the cfe-commits mailing list