This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix CodeGenAction for LLVM IR MemBuffers
ClosedPublic

Authored by RSenApps on Mar 8 2022, 3:13 PM.

Details

Summary

Replaces use of getCurrentFile with getCurrentFileOrBufferName
in CodeGenAction. This avoids an assertion error or an incorrect
name chosen for the output file when assertions are disabled.
This error previously occurred when the FrontendInputFile was a
MemoryBuffer instead of a file.

Diff Detail

Event Timeline

RSenApps created this revision.Mar 8 2022, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 3:13 PM
RSenApps requested review of this revision.Mar 8 2022, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 3:13 PM
jlebar accepted this revision.Mar 8 2022, 3:48 PM

Congrats on your first patch!

Can Daniele or Shangwu land this for you, or do you need me to?

This revision is now accepted and ready to land.Mar 8 2022, 3:48 PM

I'll land it.

This revision was automatically updated to reflect the committed changes.