mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
llvm: update remarks support on LLVM 22
LLVM change dfbd76bda01e removed separate remark support entirely, but it turns out we can just drop the parameter and everything appears to work fine. Fixes 146912 as far as I can tell (the test passes.) @rustbot label llvm-main
This commit is contained in:
@@ -1779,9 +1779,14 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
|
||||
// Do not delete the file after we gather remarks
|
||||
RemarkFile->keep();
|
||||
|
||||
#if LLVM_VERSION_GE(22, 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));
|
||||
|
||||
Reference in New Issue
Block a user