mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
28 lines
666 B
C++
28 lines
666 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include <memory>
|
|
#include <type_traits>
|
|
|
|
#define USE_DYNAMIC_PTC
|
|
#include "ptc.h"
|
|
|
|
template<void (*T)(PTCInstructionList *)>
|
|
using PTCDestructorWrapper = std::integral_constant<decltype(T), T>;
|
|
|
|
inline void ptcInstructionListDestructor(PTCInstructionList *This) {
|
|
ptc_instruction_list_free(This);
|
|
delete This;
|
|
}
|
|
|
|
using PTCDestructor = PTCDestructorWrapper<&ptcInstructionListDestructor>;
|
|
|
|
using PTCInstructionListPtr = std::unique_ptr<PTCInstructionList,
|
|
PTCDestructor>;
|
|
|
|
// NOLINTNEXTLINE
|
|
extern PTCInterface ptc;
|