This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix TypeID for shared libraries built with -fvisibility=hidden.
ClosedPublic

Authored by stellaraccident on Oct 9 2020, 11:51 AM.

Details

Summary
  • Isolates the visibility controlled parts of its implementation to a detail namespace.
  • Applies a struct level visibility attribute which applies to the static local within the get() functions.
  • The prior version was not emitting a symbol for the static local "instance" fields when the user TU was compiled with -fvisibility=hidden.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2020, 11:51 AM
stellaraccident requested review of this revision.Oct 9 2020, 11:51 AM
rriddle accepted this revision.Oct 9 2020, 12:02 PM
This revision is now accepted and ready to land.Oct 9 2020, 12:02 PM
bondhugula added inline comments.
mlir/include/mlir/Support/TypeID.h
91

Any useful comment here? May be redirect to the long one below.

bondhugula added inline comments.Oct 9 2020, 12:08 PM
mlir/include/mlir/Support/TypeID.h
99

Nit: A blank new line here would be good.

This revision was landed with ongoing or failed builds.Oct 9 2020, 12:12 PM
This revision was automatically updated to reflect the committed changes.
stellaraccident marked 2 inline comments as done.Oct 9 2020, 12:18 PM

Addressed Uday's comments in a followon NFC commit.

Nice improvement here!

mlir/include/mlir/Support/TypeID.h
112

Thanks for the extensive doc!