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:
parent
ce4beebecb
commit
42cf78f762
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue