https://github.com/halide/Halide
Raw File
Tip revision: e80d592543c87e3a517f3927b558ab0abff018b5 authored by Steven Johnson on 23 August 2019, 00:44:06 UTC
Try using --parseable-output
Tip revision: e80d592
destructors.cpp
#include "HalideRuntime.h"

#define INLINE inline __attribute__((weak)) __attribute__((always_inline)) __attribute__((used))

extern "C" {

INLINE void call_destructor(void *user_context, void (*fn)(void *user_context, void *object), void **object, bool should_call) {
    void *o = *object;
    *object = NULL;
    // Call the function
    if (o && should_call) {
        fn(user_context, o);
    }
}

}
back to top