This is an archive of the discontinued LLVM Phabricator instance.

Emit Clang version information into .comment section (CodeGen's part of implementation) [PART 2A]
ClosedPublic

Authored by kromanova on Oct 1 2013, 11:50 PM.

Details

Reviewers
rafael
Summary

This is a spin-off of a review Emit Clang version information into .comment section (LLVM's part of implementation) [PART 2]
http://llvm-reviews.chandlerc.com/D1729

The reviewer, Rafael Espíndola, asked to split LLVM's part of the patch into two separate patches (CodeGen and MC). Here is the CodeGen part of the patch with the few corrections.

Diff Detail

Event Timeline

You are also missing a test that the verifier rejects broken IL files.

What is the URL for the MC part?

lib/CodeGen/AsmPrinter/AsmPrinter.cpp
1347

please use cast instead of dyn_cast and have the verifier check that we only get strings in here.

lib/IR/Verifier.cpp
628

Please check that it is a string too.

kromanova updated this revision to Unknown Object (????).Oct 3 2013, 2:14 PM

Fixed few things that Rafael suggested.

Almost there, just a few nits.

lib/CodeGen/AsmPrinter/AsmPrinter.cpp
1347

You don't need the if when using cast. It return non-null or asserts.

lib/IR/Verifier.cpp
621

Please put the return in the next line.

clang-formating the patch would be a good idea.

test/CodeGen/X86/ident-metadata.ll
3

No need for the -filetype=obj test. I will be tested in the MC part.

kromanova updated this revision to Unknown Object (????).Oct 3 2013, 3:07 PM

Few more minor corrections are done based on the feedback.
I was wondering what is the common set of options to pass to clang-format for formatting the patch to comply with the Clang/LLVM style?

Thanks!

rafael accepted this revision.Oct 4 2013, 2:46 PM

LGTM. Do you need me to commit this or do you have commit access?

Hi Rafael,
I don't have a commit access. Please don't commit yet, since MC part needs to be committed first (otherwise we will break the build). I am working on MC part changes now.
Katya.

Eugene.Zelenko closed this revision.Oct 4 2016, 6:31 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL192764.