diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-04-08 16:58:12 -0700 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-04-08 16:58:12 -0700 |
commit | e35afbe535f96086141f57a5ce7d679429b4405f (patch) | |
tree | 74cb0393435de5e649d3fe1afcfcf6eebdf70c34 /llvm/lib/Support/Signposts.cpp | |
parent | e7ed5c920db3f537a85d962c1c918a1bb6de99fd (diff) | |
download | llvm-e35afbe535f96086141f57a5ce7d679429b4405f.zip llvm-e35afbe535f96086141f57a5ce7d679429b4405f.tar.gz llvm-e35afbe535f96086141f57a5ce7d679429b4405f.tar.bz2 |
Revert "Revert "Revert "Support: Use std::unique_ptr for SignpostEmitter::Impl, NFC"""
This reverts commit e7ed5c920db3f537a85d962c1c918a1bb6de99fd again, due
to more buildbot failures:
https://lab.llvm.org/buildbot/#/builders/131/builds/8191
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 |