From 5321c71db0cf0b9f35bef81c364dba126b4840ae Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Fri, 25 Apr 2025 12:48:03 -0400 Subject: [PATCH] kfdtest: call non-deprecated overload of Target::createMCObjectStreamer() Use the new overload of Target::createMCObjectStreamer() without the three trailing, unused bool arguments. The existing overload with the three bool arguments was deprecated in LLVM 19 and removed in main. Link: https://github.com/llvm/llvm-project/commit/d69eb7b7ffb33d0be716759a38a235868671705d Link: https://github.com/llvm/llvm-project/commit/f1422a86c4a812a7ccd744082741841e596ccea0 Link: https://github.com/llvm/llvm-project/commit/f2ff298867d7733122e32eead5a8c524b09dfdb1 Signed-off-by: Peter Colberg --- libhsakmt/tests/kfdtest/src/Assemble.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libhsakmt/tests/kfdtest/src/Assemble.cpp b/libhsakmt/tests/kfdtest/src/Assemble.cpp index eda7fa841..0a4cdaa6b 100644 --- a/libhsakmt/tests/kfdtest/src/Assemble.cpp +++ b/libhsakmt/tests/kfdtest/src/Assemble.cpp @@ -359,11 +359,18 @@ int Assembler::RunAssemble(const char* const AssemblySource) { return -1; } +#if LLVM_VERSION_MAJOR < 19 std::unique_ptr Streamer(TheTarget->createMCObjectStreamer( TheTriple, Ctx, std::unique_ptr(MAB), MAB->createObjectWriter(*OS), std::unique_ptr(CE), *STI, MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible, /*DWARFMustBeAtTheEnd*/ false)); +#else + std::unique_ptr Streamer(TheTarget->createMCObjectStreamer( + TheTriple, Ctx, + std::unique_ptr(MAB), MAB->createObjectWriter(*OS), + std::unique_ptr(CE), *STI)); +#endif std::unique_ptr Parser( createMCAsmParser(SrcMgr, Ctx, *Streamer, *MAI));