This is an archive of the discontinued LLVM Phabricator instance.

Undef the `DEFINE_C_API_STRUCT` macro after using it in the MLIR C API header (NFC)
ClosedPublic

Authored by mehdi_amini on Nov 2 2020, 10:59 AM.

Details

Summary

Leaking macros isn't a good practice when defining headers. This
requires to duplicate the macro definition in every header though, but
that seems like a better tradeoff right now.

Diff Detail

Event Timeline

mehdi_amini created this revision.Nov 2 2020, 10:59 AM
mehdi_amini requested review of this revision.Nov 2 2020, 10:59 AM
ftynse accepted this revision.Nov 2 2020, 11:04 AM
This revision is now accepted and ready to land.Nov 2 2020, 11:04 AM
stellaraccident accepted this revision.Nov 2 2020, 11:04 AM
rriddle accepted this revision.Nov 2 2020, 11:05 AM
rriddle added inline comments.
mlir/include/mlir-c/AffineExpr.h
33

Newline before here?

mlir/include/mlir-c/AffineMap.h
32

Newline before here?

This revision was landed with ongoing or failed builds.Nov 2 2020, 11:18 AM
This revision was automatically updated to reflect the committed changes.
mehdi_amini marked 2 inline comments as done.Nov 2 2020, 11:19 AM