Skip to content

[RemoveDIs] Temporarily suppress memory leak #106779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
#include "gtest/gtest.h"
#include <memory>

#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD
#include <sanitizer/lsan_interface.h>
#else
namespace __lsan {
struct ScopedDisabler {};
} // namespace __lsan
#endif

using namespace llvm;

static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) {
Expand Down Expand Up @@ -1527,6 +1535,10 @@ TEST(BasicBlockDbgInfoTest, DbgMoveToEnd) {

TEST(BasicBlockDbgInfoTest, CloneTrailingRecordsToEmptyBlock) {
LLVMContext C;
// FIXME: There is a leak introduced with
// https://github.com/llvm/llvm-project/pull/105671
__lsan::ScopedDisabler Leaks;
(void)Leaks;
std::unique_ptr<Module> M = parseIR(C, R"(
define i16 @foo(i16 %a) !dbg !6 {
entry:
Expand Down
Loading