[PATCH] Emit Clang version information into .comment section (Clang's part of implementation) [PART 1]

Hal Finkel hfinkel at anl.gov
Thu Sep 26 09:46:46 PDT 2013


----- Original Message -----
> > Clang changes:
> > - Added an additional function "EmitVersionIdentMetadata()" to
> > clang/lib/CodeGen/CodeGenModule.cpp. This emits named metadata for
> > the version string. The format of the metadata is:
> >
> >     !llvm.ident = !{!N}
> >     !N = metadata !{metadata !"clang version string"}
> >
> 
> I agree we should include the version information. Do you expect llvm
> to reason about this in any way? If not, it might be better for clang
> to just emit a global inline asm with the .ident, no?

I would strongly support the metadata solution. I think that it will make it much easier to pull the version information, for example, out of LTO archives. We also may want to add custom transformation passes to encode this information in other ways in the resulting objects.

 -Hal

> 
> Cheers,
> Rafael
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-commits mailing list