[PATCH] D11897: [libunwind] Make it possible to use libunwind without heap.

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 19:28:06 PDT 2015


compnerd added inline comments.

================
Comment at: src/UnwindCursor.hpp:898
@@ -897,1 +897,3 @@
   #endif
+  #ifdef _LIBUNWIND_NO_HEAP
+        ;
----------------
Please use:

    #if !defined(_LIBUNWIND_NO_HEAP)
        DwarfFDECache<A>::add(sects.dso_base, fdeInfo.pcStart, fdeInfo.pcEnd,
                              fdeInfo.fdeStart);
    #endif

rather than the empty clause with a semicolon.

Even better would be be make the add operation a no-op if built without support for the heap.  You could do that statically, avoiding the mess of conditional compilation.


http://reviews.llvm.org/D11897





More information about the llvm-commits mailing list