Subtle breaking change in LLVM 2.7 to 2.8 transition

I updated my from LLVM 2.7 to 2.8/trunk tonight and was mystified as to why my GC plugin silently stopped working.

The problem was that the signature of the virtual function GCMetadataPrinter::finishAssembly (and beginAssembly) changed.

This change would probably be an excellent candidate for the “gotchas” section of the 2.8 release notes.

Thanks!
– Ben

Hi Ben,

I updated my from LLVM 2.7 to 2.8/trunk tonight and was mystified as to why my
GC plugin silently stopped working.

The problem was that the signature of the virtual function
GCMetadataPrinter::finishAssembly (and beginAssembly) changed.

This change would probably be an excellent candidate for the "gotchas" section
of the 2.8 release notes.

can you please send some text appropriate for the release notes that explains
the problem.

Thanks a lot,

Duncan.

I must admit this is a problem that -Woverloaded-virtual would have caught. I ended up compiling my plugin statically without that flag, because my project is mixed C and C++, and -Woverloaded-virtual can’t be used with C. I think it still might be worthwhile to include a brief note documenting the change.

Anyways, how’s this for a reasonably short blurb:

The signature of the GCMetadataPrinter::finishAssembly virtual function changed: the raw_ostream and MCAsmInfo arguments were dropped. GC plugins which compute stack maps must be updated to avoid having the old definition overload the new signature.

Cheers,
– Ben

Hi Ben,

Anyways, how's this for a reasonably short blurb:

The signature of the GCMetadataPrinter::finishAssembly virtual function changed:
the raw_ostream and MCAsmInfo arguments were dropped. GC plugins which compute
stack maps must be updated to avoid having the old definition overload the new
signature.

thanks for this. I forgot to add it to the release notes, but have added it now
(after the release, d'oh!).

Best wishes,

Duncan.