diff options
Diffstat (limited to 'llvm/lib/Support/Signposts.cpp')
-rw-r--r-- | llvm/lib/Support/Signposts.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Support/Signposts.cpp b/llvm/lib/Support/Signposts.cpp index 9d1fded..b277bb0 100644 --- a/llvm/lib/Support/Signposts.cpp +++ b/llvm/lib/Support/Signposts.cpp @@ -96,18 +96,21 @@ public: #define HAVE_ANY_SIGNPOST_IMPL 1 #else #define HAVE_ANY_SIGNPOST_IMPL 0 - -/// Definition necessary for use of std::unique_ptr. -class SignpostEmitterImpl {}; #endif 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 |