Page MenuHomePhabricator

[compiler-rt] [builtin] Switch the return type of __atomic_compare_exchange_##n to bool

Authored by krytarowski on May 13 2020, 3:18 AM.



Synchronize the function definition with the LLVM documentation.

GCC also returns bool for the same atomic builtin.

Diff Detail

Event Timeline

krytarowski created this revision.May 13 2020, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2020, 3:19 AM
Herald added subscribers: Restricted Project, jfb, dberris. · View Herald Transcript
theraven accepted this revision.May 13 2020, 4:28 AM
theraven added a subscriber: theraven.

I don't object to this, it more correctly expresses the intent. The original int was taken from the GCC docs describing the ABI for these functions. Have the GCC docs been updated?

This revision is now accepted and ready to land.May 13 2020, 4:28 AM
This revision was automatically updated to reflect the committed changes.