diff options
Diffstat (limited to 'llvm/lib/Support/Signposts.cpp')
-rw-r--r-- | llvm/lib/Support/Signposts.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Support/Signposts.cpp b/llvm/lib/Support/Signposts.cpp index b277bb0..37e16a9 100644 --- a/llvm/lib/Support/Signposts.cpp +++ b/llvm/lib/Support/Signposts.cpp @@ -90,6 +90,9 @@ public: } }; } // end namespace llvm +#else +/// Definition necessary for use of std::unique_ptr in SignpostEmitter::Impl. +class llvm::SignpostEmitterImpl {}; #endif // if LLVM_SUPPORT_XCODE_SIGNPOSTS #if LLVM_SUPPORT_XCODE_SIGNPOSTS @@ -100,17 +103,11 @@ public: SignpostEmitter::SignpostEmitter() { #if HAVE_ANY_SIGNPOST_IMPL - Impl = new SignpostEmitterImpl(); -#else // if HAVE_ANY_SIGNPOST_IMPL - Impl = nullptr; + Impl = std::make_unique<SignpostEmitterImpl>(); #endif // if !HAVE_ANY_SIGNPOST_IMPL } -SignpostEmitter::~SignpostEmitter() { -#if HAVE_ANY_SIGNPOST_IMPL - delete Impl; -#endif // if HAVE_ANY_SIGNPOST_IMPL -} +SignpostEmitter::~SignpostEmitter() = default; bool SignpostEmitter::isEnabled() const { #if HAVE_ANY_SIGNPOST_IMPL |