Skip to content
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