#define LLVM_SUPPORT_SIGNPOSTS_H
#include "llvm/ADT/StringRef.h"
-#include <memory>
namespace llvm {
class SignpostEmitterImpl;
/// Manages the emission of signposts into the recording method supported by
/// the OS.
class SignpostEmitter {
- std::unique_ptr<SignpostEmitterImpl> Impl;
+ /// Not using std::unique_ptr since some hosts need a definition.
+ SignpostEmitterImpl *Impl;
public:
SignpostEmitter();
SignpostEmitter::SignpostEmitter() {
#if HAVE_ANY_SIGNPOST_IMPL
- Impl = std::make_unique<SignpostEmitterImpl>();
+ Impl = new SignpostEmitterImpl();
+#else // if HAVE_ANY_SIGNPOST_IMPL
+ Impl = nullptr;
#endif // if !HAVE_ANY_SIGNPOST_IMPL
}
-SignpostEmitter::~SignpostEmitter() = default;
+SignpostEmitter::~SignpostEmitter() {
+#if HAVE_ANY_SIGNPOST_IMPL
+ delete Impl;
+#endif // if HAVE_ANY_SIGNPOST_IMPL
+}
bool SignpostEmitter::isEnabled() const {
#if HAVE_ANY_SIGNPOST_IMPL