Skip to content

[NewPM] Set diagnostic handler in MachineModuleAnalysis #88229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

paperchalice
Copy link
Contributor

setDiagnosticHandler is idempotent.

@paperchalice paperchalice requested review from arsenm and aeubanks April 10, 2024 05:32
Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can there be a test for this?

@paperchalice
Copy link
Contributor Author

Add a unit test.

Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with comment addressed

MPM.addPass(createModuleToMachineFunctionPassAdaptor(std::move(MFPM)));

testing::internal::CaptureStderr();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL CaptureStderr, this is good to know

I'd separate the ReportWarningPass run out to its own test that doesn't check Counts

`setDiagnosticHandler` is idempotent.
@paperchalice paperchalice merged commit f6ca37b into llvm:main Apr 13, 2024
@paperchalice paperchalice deleted the handler branch April 13, 2024 11:03
bazuzi pushed a commit to bazuzi/llvm-project that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants