Skip to content

Commit 9eee6a4

Browse files
committed
Remove usage of remarks::SerializerMode when building against upstream LLVM
This has been removed by llvm/llvm-project#156715.
1 parent f6092f2 commit 9eee6a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,9 +1779,14 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
17791779
// Do not delete the file after we gather remarks
17801780
RemarkFile->keep();
17811781

1782+
#if LLVM_VERSION_GE(21, 0)
1783+
auto RemarkSerializer = remarks::createRemarkSerializer(
1784+
llvm::remarks::Format::YAML, RemarkFile->os());
1785+
#else
17821786
auto RemarkSerializer = remarks::createRemarkSerializer(
17831787
llvm::remarks::Format::YAML, remarks::SerializerMode::Separate,
17841788
RemarkFile->os());
1789+
#endif
17851790
if (Error E = RemarkSerializer.takeError()) {
17861791
std::string Error = std::string("Cannot create remark serializer: ") +
17871792
toString(std::move(E));

0 commit comments

Comments
 (0)