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
5 changes: 5 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1779,9 +1779,14 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
// Do not delete the file after we gather remarks
RemarkFile->keep();

#if LLVM_VERSION_GE(21, 0)
auto RemarkSerializer = remarks::createRemarkSerializer(
llvm::remarks::Format::YAML, RemarkFile->os());
#else
auto RemarkSerializer = remarks::createRemarkSerializer(
llvm::remarks::Format::YAML, remarks::SerializerMode::Separate,
RemarkFile->os());
#endif
if (Error E = RemarkSerializer.takeError()) {
std::string Error = std::string("Cannot create remark serializer: ") +
toString(std::move(E));
Expand Down
Loading