This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Introduce the IRAttribute helper struct
ClosedPublic

Authored by jdoerfert on Aug 3 2019, 9:43 PM.

Details

Summary

Certain properties, e.g., an AttrKind, are not shared among all abstract
attributes. This patch extracts the functionality into a helper struct.

Event Timeline

jdoerfert created this revision.Aug 3 2019, 9:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2019, 9:43 PM
sstefan1 accepted this revision.Aug 4 2019, 5:06 PM

LGTM.

This revision is now accepted and ready to land.Aug 4 2019, 5:06 PM
This revision was automatically updated to reflect the committed changes.
aprantl added a subscriber: aprantl.Aug 6 2019, 9:46 AM

This series of commits broke the modular builds of LLVM.

See http://green.lab.llvm.org/green/view/Clang/job/clang-stage2-Rthinlto/242/
http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/32798/consoleFull#-285067057a1ca8a51-895e-46c6-af87-ce24fa4cd561

I think the problem that the virtual method definitions in the modular headers pull in link-time dependencies for every client that imports the IPO module. The correct fix is likely to move all the virtual function bodies into the respective .cpp files. Can you please either revert the patch series or quickly fix this?

thanks!

RKSimon added inline comments.
llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
959 ↗(On Diff #213494)

@jdoerfert Is this correct? I'm seeing cppcheck warnings that these are missing override specifiers.