Page MenuHomePhabricator

[AIX] Emit version string in .file directive
ClosedPublic

Authored by jsji on Jul 9 2021, 3:06 PM.

Details

Reviewers
shchenz
Whitney
Group Reviewers
Restricted Project
Commits
rG28fb69e00a4d: [AIX] Emit version string in .file directive
Summary

AIX .file directive support including compiler version string.
https://www.ibm.com/docs/en/aix/7.2?topic=ops-file-pseudo-op

This patch adds the support so that it will be easier to identify build
compiler in objects.

Diff Detail

Event Timeline

jsji created this revision.Jul 9 2021, 3:06 PM
jsji requested review of this revision.Jul 9 2021, 3:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2021, 3:06 PM
Whitney added inline comments.Jul 9 2021, 3:23 PM
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
314

typo: description

jsji updated this revision to Diff 357682.Jul 9 2021, 6:41 PM

Fix typo.

jsji marked an inline comment as done.Jul 9 2021, 6:41 PM
shchenz accepted this revision.Jul 11 2021, 7:49 PM

LGTM. Thanks for doing this.

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
316

Don't need {} for the else block.

This revision is now accepted and ready to land.Jul 11 2021, 7:49 PM
jsji added inline comments.Jul 11 2021, 8:29 PM
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
316

Thanks. I chose to add it because I think omission of braces harm the readability and maintainability here, because the if body is too complex. So

Use braces for the else block to keep it uniform with the if block.

https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

This revision was landed with ongoing or failed builds.Jul 12 2021, 10:04 AM
This revision was automatically updated to reflect the committed changes.